{"repo":"niklak/dom_query","free":true,"listed":false,"github":"https://github.com/niklak/dom_query","clone":"git clone https://github.com/niklak/dom_query.git","description":"A Flexible Rust Crate for DOM Querying and Manipulation","language":"Rust","stars":92,"topics":["css-selectors","html","html5ever","parser","scraping","selectors","web-scraping"],"license":null,"category":"scrapers-browser-automation","readme_excerpt":"DOM QUERY: A Flexible Rust Crate for DOM Querying and Manipulation DOM QUERY is a flexible Rust crate that simplifies HTML parsing, DOM querying and manipulation by providing a high-level jQuery-like API. It uses the html5ever crate for HTML parsing and the selectors crate for efficient DOM traversal and element selection. Features - Parse HTML documents and fragments - Query DOM elements using CSS selectors - Traverse the DOM tree (ancestors, parents, children, siblings) - Manipulate elements and their attributes: - Add/remove/modify attributes - Change element content - Add/remove elements - Rename elements - Move elements within the DOM tree [!NOTE] This crate is a significantly enhanced fork of nipper, featuring expanded CSS selector support, enhanced DOM traversal and improved DOM manipulation capabilities. Examples Parsing a document Parsing a fragment Selecting elements Selecting a single match and multiple matches Selecting descendent elements Selecting ancestors Selecting with precompiled matchers (for reuse) Selecting with pseudo-classes (:has, :has-text, :contains, :only-text) Serializing to HTML Accessing descendent text Accessing immediate text Manipulating the attribute of an HTML element Manipulating the DOM Node manipulations: Creating an empty element, adding a single element to a single node Renaming selected elements without changing the contents Retrieving The Base URI Verifying Selection and Node Matches Fast Finding Child Elements Serializing a document ","default_branch":null,"files":null,"tree":[],"storefront":"/r/niklak","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/niklak/dom_query/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}