how to set payload in cheerio crawler preNavigationHooks
doing it like this:
does not work, error:
ReferenceError: page is not defined
also when I want to set headers, should I use gotOptions.headers=
or request.headers=
what is the difference?3 Replies
optimistic-gold•3y ago
Looks like a bug, will tell team to check
absent-sapphire•3y ago
Need to see full error stack since under Cheerio
page
not supposed to be used. I guess you might be setting payload for GET request and crawler gone wild.
As for headers - I using request.headers in one of the actors, works finegenetic-orangeOP•3y ago
so it was bug in my code 🤦♂️ it has nothing to do with puppeteer page
I had payload like this
.....${page}
but it was too long and way out of the screen to notice it