Reduce dependency overhead
Opened this issue · 4 comments
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.
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.
Lines 11 to 33 in fd80462
@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 🙂