Cheerio HTML Parser
cheerio.js.org
1
Leaving SiteNav
External Link Disclaimer
You are about to visit cheerio.js.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Cheerio is a fast, lean implementation of core jQuery designed specifically for the server created by Matt Mueller in 2011, providing HTML parsing, traversal, manipulation, and rendering through a jQuery-like API without the browser overhead, designed for web scraping, HTML processing, server-side rendering, and data extraction in Node-dot-js applications, adopted by over twenty thousand npm packages and millions of projects including popular scraping frameworks and static site generators for their HTML manipulation needs. The parsing engine uses the htmlparser2 library for parsing HTML into a DOM-like tree structure, with Cheerio wrapping the parsed tree in a jQuery-like API including the dollar sign function for element selection, methods for traversal including find, children, parent, siblings, next, prev, and closest, methods for manipulation including append, prepend, after, before, remove, replaceWith, and attr, and methods for reading including text, html, and each, enabling familiar jQuery syntax for server-side HTML processing. The performance advantage over browser-based solutions comes from the absence of a rendering engine, style calculation, layout computation, and JavaScript execution, with Cheerio operating purely on the parsed HTML tree, resulting in parse and manipulation speeds up to eight times faster than solutions using a headless browser. The serialization back to HTML. The XML mode option. The script execution prevention. The decode entities. The lowerCaseTags and lowerCaseAttributeNames options. The static methods. The rendering options. Designed by Matt Mueller. Designed for Node developers.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike