[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3589":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":39,"discoverSource":40},3589,"cheerio","cheeriojs\u002Fcheerio","cheeriojs","The fast, flexible, and elegant library for parsing and manipulating HTML and XML.","https:\u002F\u002Fcheerio.js.org",null,"TypeScript",30364,1690,344,24,0,2,9,53,7,83.48,"MIT License",false,"main",true,[5,27,28,29,30,31,32,33,34,35],"dom","hacktoberfest","html","htmlparser","htmlparser2","jquery","parser","scraper","selector","2026-06-12 04:00:18","\u003Ch1 align=\"center\">cheerio\u003C\u002Fh1>\n\n\u003Ch5 align=\"center\">The fast, flexible, and elegant library for parsing and manipulating HTML and XML.\u003C\u002Fh5>\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio\u002Factions\u002Fworkflows\u002Fci.yml\">\n    \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"Build Status\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fcheeriojs\u002Fcheerio\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fcoveralls\u002Fgithub\u002Fcheeriojs\u002Fcheerio\u002Fmain\" alt=\"Coverage\">\n  \u003C\u002Fa>\n  \u003Ca href=\"#backers\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fopencollective\u002Fbackers\u002Fcheerio\" alt=\"OpenCollective backers\">\n  \u003C\u002Fa>\n  \u003Ca href=\"#sponsors\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fopencollective\u002Fsponsors\u002Fcheerio\" alt=\"OpenCollective sponsors\">\n  \u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fscorecard.dev\u002Fviewer\u002F?uri=github.com\u002Fcheeriojs\u002Fcheerio\">\n    \u003Cimg src=\"https:\u002F\u002Fapi.scorecard.dev\u002Fprojects\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio\u002Fbadge\" alt=\"OpenSSF Scorecard\">\n  \u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\u003Cbr>\n\n[中文文档 (Chinese Readme)](https:\u002F\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio\u002Fwiki\u002FChinese-README)\n\n```js\nimport * as cheerio from 'cheerio';\nconst $ = cheerio.load('\u003Ch2 class=\"title\">Hello world\u003C\u002Fh2>');\n\n$('h2.title').text('Hello there!');\n$('h2').addClass('welcome');\n\n$.html();\n\u002F\u002F=> \u003Chtml>\u003Chead>\u003C\u002Fhead>\u003Cbody>\u003Ch2 class=\"title welcome\">Hello there!\u003C\u002Fh2>\u003C\u002Fbody>\u003C\u002Fhtml>\n```\n\n## Installation\n\nInstall Cheerio using a package manager like npm, yarn, or bun.\n\n```bash\nnpm install cheerio\n# or\nbun add cheerio\n```\n\n## Features\n\n**&#10084; Proven syntax:** Cheerio implements a subset of core jQuery. Cheerio\nremoves all the DOM inconsistencies and browser cruft from the jQuery library,\nrevealing its truly gorgeous API.\n\n**&#991; Blazingly fast:** Cheerio works with a very simple, consistent DOM\nmodel. As a result parsing, manipulating, and rendering are incredibly\nefficient.\n\n**&#10049; Incredibly flexible:** Cheerio wraps around\n[parse5](https:\u002F\u002Fgithub.com\u002Finikulin\u002Fparse5) for parsing HTML and can optionally\nuse the forgiving [htmlparser2](https:\u002F\u002Fgithub.com\u002Ffb55\u002Fhtmlparser2\u002F). Cheerio\ncan parse nearly any HTML or XML document. Cheerio works in both browser and\nserver environments.\n\n## API\n\n### Loading\n\nFirst you need to load in the HTML. This step in jQuery is implicit, since\njQuery operates on the one, baked-in DOM. With Cheerio, we need to pass in the\nHTML document.\n\n```js\n\u002F\u002F ESM or TypeScript:\nimport * as cheerio from 'cheerio';\n\n\u002F\u002F In other environments:\nconst cheerio = require('cheerio');\n\nconst $ = cheerio.load('\u003Cul id=\"fruits\">...\u003C\u002Ful>');\n\n$.html();\n\u002F\u002F=> \u003Chtml>\u003Chead>\u003C\u002Fhead>\u003Cbody>\u003Cul id=\"fruits\">...\u003C\u002Ful>\u003C\u002Fbody>\u003C\u002Fhtml>\n```\n\n### Selectors\n\nOnce you've loaded the HTML, you can use jQuery-style selectors to find elements\nwithin the document.\n\n#### \\$( selector, [context], [root] )\n\n`selector` searches within the `context` scope which searches within the `root`\nscope. `selector` and `context` can be a string expression, DOM Element, array\nof DOM elements, or cheerio object. `root`, if provided, is typically the HTML\ndocument string.\n\nThis selector method is the starting point for traversing and manipulating the\ndocument. Like in jQuery, it's the primary method for selecting elements in the\ndocument.\n\n```js\n$('.apple', '#fruits').text();\n\u002F\u002F=> Apple\n\n$('ul .pear').attr('class');\n\u002F\u002F=> pear\n\n$('li[class=orange]').html();\n\u002F\u002F=> Orange\n```\n\n### Rendering\n\nWhen you're ready to render the document, you can call the `html` method on the\n\"root\" selection:\n\n```js\n$.root().html();\n\u002F\u002F=>  \u003Chtml>\n\u002F\u002F      \u003Chead>\u003C\u002Fhead>\n\u002F\u002F      \u003Cbody>\n\u002F\u002F        \u003Cul id=\"fruits\">\n\u002F\u002F          \u003Cli class=\"apple\">Apple\u003C\u002Fli>\n\u002F\u002F          \u003Cli class=\"orange\">Orange\u003C\u002Fli>\n\u002F\u002F          \u003Cli class=\"pear\">Pear\u003C\u002Fli>\n\u002F\u002F        \u003C\u002Ful>\n\u002F\u002F      \u003C\u002Fbody>\n\u002F\u002F    \u003C\u002Fhtml>\n```\n\nIf you want to render the\n[`outerHTML`](https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FElement\u002FouterHTML)\nof a selection, you can use the `outerHTML` prop:\n\n```js\n$('.pear').prop('outerHTML');\n\u002F\u002F=> \u003Cli class=\"pear\">Pear\u003C\u002Fli>\n```\n\nYou may also render the text content of a Cheerio object using the `text`\nmethod:\n\n```js\nconst $ = cheerio.load('This is \u003Cem>content\u003C\u002Fem>.');\n$('body').text();\n\u002F\u002F=> This is content.\n```\n\n### The \"DOM Node\" object\n\nCheerio collections are made up of objects that bear some resemblance to\n[browser-based DOM nodes](https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FNode).\nYou can expect them to define the following properties:\n\n- `tagName`\n- `parentNode`\n- `previousSibling`\n- `nextSibling`\n- `nodeValue`\n- `firstChild`\n- `childNodes`\n- `lastChild`\n\n## Screencasts\n\n[https:\u002F\u002Fvimeo.com\u002F31950192](https:\u002F\u002Fvimeo.com\u002F31950192)\n\n> This video tutorial is a follow-up to Nettut's \"How to Scrape Web Pages with\n> Node.js and jQuery\", using cheerio instead of JSDOM + jQuery. This video shows\n> how easy it is to use cheerio and how much faster cheerio is than JSDOM +\n> jQuery.\n\n## Cheerio in the real world\n\nAre you using cheerio in production? Add it to the\n[wiki](https:\u002F\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio\u002Fwiki\u002FCheerio-in-Production)!\n\n## Sponsors\n\nDoes your company use Cheerio in production? Please consider\n[sponsoring this project](https:\u002F\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio?sponsor=1)! Your\nhelp will allow maintainers to dedicate more time and resources to its\ndevelopment and support.\n\n**Headlining Sponsors**\n\n\u003C!-- BEGIN SPONSORS: headliner -->\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"128px\" width=\"128px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Favatars.githubusercontent.com%2Fgithub?ixlib=js-3.8.0&w=128&h=128&fit=fillmax&fill=solid&s=65172918690f124c0adebece30c66471\" title=\"Github\" alt=\"Github\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.airbnb.com\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"128px\" width=\"128px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Favatars.githubusercontent.com%2Fairbnb?ixlib=js-3.8.0&w=128&h=128&fit=fillmax&fill=solid&s=e679125f79ca84598b8f8420b581dea5\" title=\"AirBnB\" alt=\"AirBnB\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhasdata.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"128px\" width=\"128px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Fhasdata.com%2Ffavicon.svg?ixlib=js-3.8.0&w=128&h=128&fit=fillmax&fill=solid&s=21933842d61dec74a961fc57754e58cb\" title=\"HasData\" alt=\"HasData\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fcontext.dev\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"128px\" width=\"128px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Favatars.githubusercontent.com%2Fcontext-dot-dev?ixlib=js-3.8.0&w=128&h=128&fit=fillmax&fill=solid&s=34b5fb47ac08ea46e3f4e1e191e5dc40\" title=\"context.dev\" alt=\"context.dev\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\n\u003C!-- END SPONSORS -->\n\n**Other Sponsors**\n\n\u003C!-- BEGIN SPONSORS: sponsor -->\n\n\u003Ca href=\"https:\u002F\u002Fonlinecasinosspelen.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"64px\" width=\"64px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Fimages.opencollective.com%2Fonlinecasinosspelen%2F99ac6a2%2Flogo.png?ixlib=js-3.8.0&w=64&h=64&fit=fillmax&fill=solid&s=8ec1ec058845b823858f22205485be02\" title=\"OnlineCasinosSpelen\" alt=\"OnlineCasinosSpelen\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002FNieuwe-Casinos.net\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"64px\" width=\"64px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Fimages.opencollective.com%2Fnieuwecasinos%2Fc67d423%2Flogo.png?ixlib=js-3.8.0&w=64&h=64&fit=fillmax&fill=solid&s=ed55d86b80b1aa8cf89b033020521945\" title=\"Nieuwe-Casinos.net\" alt=\"Nieuwe-Casinos.net\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\n\u003C!-- END SPONSORS -->\n\n## Backers\n\n[Become a backer](https:\u002F\u002Fgithub.com\u002Fcheeriojs\u002Fcheerio?sponsor=1) to show your\nsupport for Cheerio and help us maintain and improve this open source project.\n\n\u003C!-- BEGIN SPONSORS: backer -->\n\n\u003Ca href=\"https:\u002F\u002Fkafidoff.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n            \u003Cimg height=\"64px\" width=\"64px\" src=\"https:\u002F\u002Fhumble.imgix.net\u002Fhttps%3A%2F%2Fimages.opencollective.com%2Fkafidoff-vasy%2Fd7ff85c%2Favatar.png?ixlib=js-3.8.0&w=64&h=64&fit=fillmax&fill=solid&s=a41c66c2f9b1d3a7a241e425e7aa2d09\" title=\"Vasy Kafidoff\" alt=\"Vasy Kafidoff\">\u003C\u002Fimg>\n          \u003C\u002Fa>\n\n\u003C!-- END SPONSORS -->\n\n## License\n\nMIT\n","Cheerio 是一个快速、灵活且优雅的库，用于解析和操作HTML及XML文档。它实现了jQuery的核心子集，去除了DOM不一致性和浏览器特定代码，保留了简洁强大的API。Cheerio使用parse5或htmlparser2进行解析，支持几乎所有的HTML和XML文档，并且在浏览器和服务器环境中都能运行。其主要特点包括高效的解析与渲染速度、灵活的配置选项以及跨环境的支持能力。该工具非常适合需要从网页中提取数据（如网络爬虫）、处理HTML内容或进行DOM操作的各种场景。","2026-06-11 02:54:47","top_language"]