{"id":18033381,"url":"https://github.com/importcjj/nipper","last_synced_at":"2025-04-05T05:06:38.956Z","repository":{"id":52421455,"uuid":"251673661","full_name":"importcjj/nipper","owner":"importcjj","description":"A Rust crate for manipulating HTML with CSS selectors","archived":false,"fork":false,"pushed_at":"2024-03-20T08:05:29.000Z","size":4394,"stargazers_count":123,"open_issues_count":8,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T04:06:43.997Z","etag":null,"topics":["css-selectors","html","html5ever","nipper","scraper","selectors","spider"],"latest_commit_sha":null,"homepage":"https://docs.rs/nipper","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/importcjj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-31T17:05:20.000Z","updated_at":"2025-01-29T11:20:11.000Z","dependencies_parsed_at":"2024-06-19T04:08:35.837Z","dependency_job_id":"0a567b63-0bfa-4c0f-8361-b72963fe9eb0","html_url":"https://github.com/importcjj/nipper","commit_stats":{"total_commits":56,"total_committers":5,"mean_commits":11.2,"dds":0.2678571428571429,"last_synced_commit":"54e044eaac2c7533414afa9f2e4f807cf67f21b3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importcjj%2Fnipper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importcjj%2Fnipper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importcjj%2Fnipper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/importcjj%2Fnipper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/importcjj","download_url":"https://codeload.github.com/importcjj/nipper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289427,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css-selectors","html","html5ever","nipper","scraper","selectors","spider"],"created_at":"2024-10-30T11:06:51.206Z","updated_at":"2025-04-05T05:06:38.918Z","avatar_url":"https://github.com/importcjj.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Nipper\n\n\u003e A crate for manipulating HTML with Rust.\n\n\u003cdiv\u003e\n  \u003c!-- Crates version --\u003e\n  \u003ca href=\"https://crates.io/crates/nipper\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/nipper.svg?style=flat-square\"\n    alt=\"Crates.io version\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Downloads --\u003e\n  \u003ca href=\"https://crates.io/crates/nipper\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/d/nipper.svg?style=flat-square\"\n      alt=\"Download\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- docs.rs docs --\u003e\n  \u003ca href=\"https://docs.rs/nipper\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square\"\n      alt=\"docs.rs docs\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://travis-ci.com/github/importcjj/nipper\"\u003e\n    \u003cimg src=\"https://travis-ci.com/importcjj/nipper.svg?branch=master\" alt=\"travis ci\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\nNipper based on HTML crate html5ever and the CSS selector crate selectors. You can use the jQuery-like syntax to query and manipulate an HTML document quickly. **Not only can query, but also can modify**.\n\n\n![nipper-logo](./logo.jpg)\n\n## Example\n\n#### Extract the hacker news.\n\n```rust\nuse nipper::Document;\n\nfn main() {\n    let html = include_str!(\"../test-pages/hacker_news.html\");\n    let document = Document::from(html);\n\n    document.select(\"tr.athing\").iter().for_each(|athing| {\n        let title = athing.select(\".title a\");\n        let href = athing.select(\".storylink\");\n        println!(\"{}\", title.text());\n        println!(\"{}\", href.attr(\"href\").unwrap());\n        println!();\n    });\n}\n```\n\n#### Readability. \n[examples/readability.rs](./examples/readability.rs)\n\n## Related projects\n\n* [html5ever](https://crates.io/crates/html5ever)\n* [selectors](https://crates.io/crates/selectors)\n* [goquery](https://godoc.org/github.com/PuerkitoBio/goquery)\n* [scraper](https://crates.io/crates/scraper)\n* [select.rs](https://crates.io/crates/select)\n\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n#### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimportcjj%2Fnipper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimportcjj%2Fnipper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimportcjj%2Fnipper/lists"}