cheeriovssoup
cheerio is a popular JavaScript library that allows you to interact with and manipulate HTML and XML documents in a similar way to how you would with jQuery in a browser. It is a fast, flexible, and lean implementation of core jQuery designed specifically for the server.
One of the main benefits of using cheerio is that it allows you to use jQuery-like syntax to navigate and m anipulate the Document Object Model (DOM) of an HTML or XML document, making it easy to work with.
cheerio supports CSS selectors though not XPath.
soup is a Go library for parsing and querying HTML documents.
It provides a simple and intuitive interface for extracting information from HTML pages. It's inspired by popular Python web scraping
library BeautifulSoup and shares similar use API implementing functions like Find and FindAll.
soup can also use go's built-in http client to download HTML content.
Note that unlike beautifulsoup, soup does not support CSS selectors or XPath.
Example Use
Hello World!
'); // use css selectors console.log($('title').text()); // My title console.log($('.name').text()); // Hello World! // select multiple elements const $ = cheerio.load('- item 1
- item 2