Session initialization #2105
Unanswered
am-unklown
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
Thanks for crawlee^^
Can you explain please is there convinient way for handling this:
===
Have
httpCrawler in use
sessionPool in use
requestQueue in use
headerGenerator in use
gotOptions.sessionToken = crawlingContext.session;
Want
when creating new session (before it will be used for work with requestQueue) visit certain url and get cookies from it. keeping headers persistent for all requests within session (include this "cookie-init" request).
Thoughts
I see createSessionFunction param in sessionPoolOptions but i cant make requests from there bound to session being created. There is no sendRequest and context.
If create another got-scraping inside createSessionFunction (along with being created for currently constructing httpCrawler) it will have its own storage for generated headers and gotOptions.sessionToken will not work.
Beta Was this translation helpful? Give feedback.
All reactions