Open ghost opened 4 years ago
JSDOM can't be replaced with Cheerio. The goal of JSDOM is to provide an identical DOM environment as what we see in the browser. And about user-agents, yes I might remove this in the future.
Thanks for the answer. Is jsdom actually used for anything but parsing the html? I didn't see this when checking the code.
It's used here both for retrieving form data and solving challenges from Cloudflare.
https://github.com/sayem314/hooman/blob/fd80462e3258a127199c1d4066a1f1bf4ff4efab/lib/core.js#L11-L33
@sayem314 can I suggest you use top-user-agents?
It's just a JSON of user agents, updated every time you fetch the package.
849 bytes of package 🙂
jsdom and user-agents bloat this package to 6.2 MB minified. I suggest making the user agent user supplied and replacing jsdom with cheerio or something like this.