3 ms·
Cheerio [0] is fantastic for this as well... [0]: https://www.npmjs.com/package/cheerio https://www.npmjs.com/package/cheerio
by AlphaWeaver 9y ago
Cheerio [0] is fantastic for this as well...
[0]: https://www.npmjs.com/package/cheerio https://www.npmjs.com/package/cheerio
- Rapzid 9y agoUsing Cheerio with TypeScript types to parse data from tables in downloaded HTML files. Great tool.
- TheAceOfHearts 9y agoI've tried Cheerio as well, but I prefer JSDOM since it exposes the DOM APIs. What I'll normally do is interactively test things out in the browser's console, and then transfer em over to my script. Browser dev tools are just super amazing.
- madeofpalk 9y agoAgreed - I find the Cheerio APIs to be awkward when traversing deep into the DOM. Last time I used Beautiful Soup I found it also had this problem. The DOM API that JSDOM provides is such much more natural to work with.
- pitaj 9y agoCheerio is so much faster and more lightweight than jsDOM. If you can do it with Cheerio, you absolutely should.