
The industry standard for working with HTML in JavaScript | cheerio
Aug 2, 2015 · Incredibly flexible Cheerio can parse nearly any HTML or XML document. Cheerio works in both browser and server environments.
Welcome to Cheerio!
The $ function returns a Cheerio object, which is similar to an array of DOM elements. It is possible to use this object as a starting point to further traverse the DOM.
Selecting Elements | cheerio
Cheerio allows users to select elements from an HTML document using CSS selectors. This allows you to select elements based on criteria such as their tag name, class name, and attribute values.
Manipulating the DOM | cheerio
In this guide, we will focus specifically on manipulating elements within a document using Cheerio. We will cover methods for modifying element attributes and properties, adding and removing classes, …
Extracting Data with the extract Method | cheerio
The returned object will have a links property whose value is an array of these strings. Putting it all together Let's fetch the latest release of Cheerio from GitHub and extract the release date and the …
Loading Documents | cheerio
Cheerio provides several methods for loading HTML documents and parsing them into a DOM structure. These methods are useful for different scenarios, depending on the type and source of the HTML data.
Traversing the DOM | cheerio
Cheerio provides a range of methods for traversing and filtering elements within a document. These methods allow you to move up and down the DOM tree, move sideways within the tree, and filter …
Interface: CheerioAPI () | cheerio
The .load static method defined on the "loaded" Cheerio factory function is deprecated. Users are encouraged to instead use the load function exported by the Cheerio module.
Abstract Class: Cheerio<T>
Iterates over a cheerio object, reducing the set of selector elements to those that match the selector or pass the function's test. When a Cheerio selection is specified, return only the elements contained in …
Cheerio 1.0 Released, Batteries Included | cheerio
Aug 7, 2024 · Since the last release, we've published a new website and documentation for Cheerio. The new site features detailed guides and API documentation to get the most from Cheerio.