fix: fix page_options for PlaywrightBrowserPlugin#796
fix: fix page_options for PlaywrightBrowserPlugin#796janbuchar merged 3 commits intoapify:masterfrom
page_options for PlaywrightBrowserPlugin#796Conversation
|
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. |
| 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.
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.
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.
Description
page_optionsforPlaywrightBrowserPluginIssues
page_optionswithcontext_optionsforPlaywrightBrowserPlugin#755, How to changeUser AgentinPlaywrightCrawler? #751Testing
page_optionsinPlaywrightBrowserPluginChecklist