How to keep browser open when in development and how to clear cache when closing it?

I'd like to know how I can prevent the browser from closing when the crawling is finished? Also, I have a crawl that needs to sign in the user, however if the user is already signed is the site redirects the user. How can I clear the cache of the browser whenever he browser is closed? I'd expect the cache to be cleared each time but it doesn't seem to be the case.
2 Replies
exotic-emerald
exotic-emerald3y ago
SDK designed to open clear browser per crawl, its equal to opening browser in incognito mode and close it when crawler finished so keeping browser opened is not supported by SDK cache is already clear, so if you redirected under login it means user signed in from somewhere else, like from his own computer
correct-apricot
correct-apricot3y ago
1. I usually just put a sleep to request handler if I want to debug. 2. You can spawn a new session. You can do session.retire() to get rid of the current one.

Did you find this page helpful?