Skip to content
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

Toggle cookies storage #1632

Closed
namma-geniee opened this issue Dec 20, 2017 · 3 comments
Closed

Toggle cookies storage #1632

namma-geniee opened this issue Dec 20, 2017 · 3 comments

Comments

@namma-geniee
Copy link

May you add the ability to enable/disable cookies storage on the browser as the configuration in the screenshot below?

image

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!

@Everettss
Copy link

Everettss commented Dec 20, 2017

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

@namma-geniee
Copy link
Author

@Everettss Nice! Thank you very much!

@namma-geniee
Copy link
Author

The issue was solved, but it would be better for a shortcut function call. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants