Skip to content

Commit

Permalink
Merge branch 'pp/extra_search_engines' into pp/se_api
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Feb 6, 2025
2 parents 2f01161 + 603fd5f commit f1c8b00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions elm/web/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Upgrade-Insecure-Requests": "1",
}
"""Default HTML header template"""
_BT_RENAME = {"chromium": "chrome"}
_BT_RENAME = {"chromium": "Chrome"}
# block pages by resource type. e.g. image, stylesheet
BLOCK_RESOURCE_TYPES = [
"beacon",
Expand Down Expand Up @@ -190,10 +190,9 @@ async def pw_page(browser, intercept_routes=False, stealth_config=None):
:class:`playwright.Page`
A new page that can be used for visiting websites.
"""
browser_type = browser.browser_type.name
browser_type = _BT_RENAME.get(browser_type, browser_type)
browser_type = _BT_RENAME.get(browser.browser_type.name, "random")

logger.trace("Loading browser context for browser type %s", browser_type)
logger.trace("Loading browser context for browser type %r", browser_type)
context = await browser.new_context(
base_url="http://127.0.0.1:443",
device_scale_factor=uniform(0.8, 1.2),
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ aiohttp
beautifulsoup4
click
duckduckgo-search
fake_useragent
fake_useragent>=2.0.3
google-api-python-client
html2text
langchain
Expand Down

0 comments on commit f1c8b00

Please # to comment.