conscious-sapphire
conscious-sapphire8mo ago

How can I pass context to createNewSession ?

I want to use existing crawler setting (JSON/ cherioo ) upon creating new session, signing in / signing up user there while associating cookies, token with the session. Currently I put these new session creation conditionally inside preNavigation hook (context is passed as arg there), but not in createNewSession
3 Replies
Hall
Hall8mo ago
Someone will reply to you shortly. In the meantime, this might help:
conscious-sapphire
conscious-sapphireOP8mo ago
This to give better DX when scraping protected websites where we need to: - sign in - maintain browser history - maintain cookies and token - 1 proxy, 1 auth per session
lemurio
lemurio8mo ago
Hey, information like cookies/tokens becomes available after you visit the site, so you can update the information stored in the session in the request handler once it's accessible

Did you find this page helpful?