fix: fix `page_options` for `PlaywrightBrowserPlugin` by Mantisus · Pull Request #796 · apify/crawlee-python

@Mantisus

@Mantisus

@Mantisus

My initial thought was to change the name of page_options to context_options. However, I think this might confuse users who are not so familiar with playwright. Especially considering that the parameters taken by new_context and new_page in playwright are identical.

So I've updated the docstring to explicitly state that these parameters are passed when the context is created.

Pijukatel

Pijukatel

Pijukatel

@Mantisus

Pijukatel

@Mantisus

vdusek

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')

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.