How can I pass context to createNewSession ?
# crawlee-js
v
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
h
Someone will reply to you shortly. In the meantime, this might help:
v
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
r
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