-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix page_options
for PlaywrightBrowserPlugin
#796
Conversation
My initial thought was to change the name of So I've updated the docstring to explicitly state that these parameters are passed when the context is created. |
"""Create a new browser context with the specified proxy settings.""" | ||
if self._header_generator: | ||
common_headers = self._header_generator.get_common_headers() | ||
sec_ch_ua_headers = self._header_generator.get_sec_ch_ua_headers(browser_type=self.browser_type) | ||
user_agent_header = self._header_generator.get_user_agent_header(browser_type=self.browser_type) | ||
extra_http_headers = dict(common_headers | sec_ch_ua_headers | user_agent_header) | ||
user_agent = user_agent_header.get('User-Agent') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was here to replace the default "headless"-something user agent. Why is it removed? Does it mean we're now using the default (headless) user agent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a test to double-check the default UA is not leaking, it burned as several times in the past in the JS version.
I think we have it tested on other places too, found this one now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
page_options
forPlaywrightBrowserPlugin
Issues
page_options
withcontext_options
forPlaywrightBrowserPlugin
#755, How to changeUser Agent
inPlaywrightCrawler
? #751Testing
page_options
inPlaywrightBrowserPlugin
Checklist