custom CheerioCrawler User-Agent?
hi, could anyone show me an example of CheerioCrawler User-Agent? I had tried
preNavigationHooks
but got a stranger error
but got error: RequestError: No headers based on this input can be generated.
I had tried use this options with header-generator
then it works, but don't work with CheerioCrawler hooks7 Replies
foreign-sapphire•3y ago
How about using the search function in the forum? https://discord.com/channels/801163717915574323/1022116407053394011
continuing-cyan•3y ago
Like this:
ambitious-aquaOP•3y ago
thanks, I had searched before. My Question is a little differnce.
1. I want to use
1. I want to use
useHeaderGenerator
so the user-agent will change each crawle to avoid block
2. it seems that is a bug of headerGeneratorOptions
?foreign-sapphire•3y ago
You can do this with fingerprint-suite (https://github.com/apify/fingerprint-suite/).
Like this
Attached POC:
cheerio_crawler
with this.@LeMoussel just advanced to level 2! Thanks for your contributions! 🎉
ambitious-aquaOP•3y ago
@LeMoussel thanks, I had use
header-generator
and it works. But my question is why built-in headerGeneratorOptions
fail, did I miss something?metropolitan-bronze•3y ago
@petrpatek. Pls check here why the header generator fails to generate