May you add the ability to enable/disable cookies storage on the browser as the configuration in the screenshot below?
While scraping, i have to destroy and create a new instance for each website to have them forget everything saved in the cookies storage, eg. the authentication.
Thank you!
I know it's not precisely what you ask for. But you don't have to destroy browser instance in order to remove all cookies. You can use dirty way (since we are waiting for #31 ) of sending clearBrowserCookies to raw devtools protocol:
await page._client.send('Network.clearBrowserCookies');
@Everettss Nice! Thank you very much!
The issue was solved, but it would be better for a shortcut function call. 😄
Most helpful comment
I know it's not precisely what you ask for. But you don't have to destroy browser instance in order to remove all cookies. You can use dirty way (since we are waiting for #31 ) of sending clearBrowserCookies to raw devtools protocol: