-
Notifications
You must be signed in to change notification settings - Fork 690
Description
According to the documentation, the browser_new_context_options are the keyword arguments that are accepted by the Playwright Browser new_context method, here:
Keyword arguments to pass to the browser new context method. These options are provided directly to Playwright's browser.new_context method. For more details, refer to the [Playwright documentation](https://playwright.dev/python/docs/api/class-browser#browser-new-context). This option should not be used if browser_pool is provided.
https://crawlee.dev/python/api/class/PlaywrightCrawler#__init__
The appropriate keywords are documented on this page:
https://playwright.dev/python/docs/api/class-browser#browser-new-context
One of those keywords is ** storage_state**.
But...
When I pass the browser_new_context_options to the PlaywrightCrawler.init method, it calls some other function called...
[crawlee.crawlers._playwright._playwright_crawler] WARN Retrying request to ___ due to: BrowserType.launch_persistent_context() got an unexpected keyword argument 'storage_state'. File "./crawlee/browsers/_playwright_browser.py", line 70, in new_context, self._context = await self._browser_type.launch_persistent_context(, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^, user_data_dir=user_data_dir, **launch_options, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, )
Please update the code to match the documentation.