{"repo":"James-LG/Skyscraper","free":true,"listed":false,"github":"https://github.com/James-LG/Skyscraper","clone":"git clone https://github.com/James-LG/Skyscraper.git","description":"Rust library for scraping HTML using XPath expressions","language":"Rust","stars":37,"topics":["html","rust","scraper","xpath"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"Skyscraper - HTML scraping with XPath Rust library to scrape HTML documents with XPath expressions. This library is major-version 0 as the API is still evolving. See the Supported XPath Features section for details. HTML Parsing Skyscraper has its own HTML parser implementation. The parser outputs a tree structure that can be traversed manually with parent/child relationships. Example: Simple HTML Parsing Example: Traversing Parent/Child Relationships WHATWG Compliance Note Skyscraper's HTML parser follows the WHATWG parsing specification. One notable consequence is implicit insertion : when , , or elements appear as direct children of , the parser automatically wraps them in a element (per WHATWG §13.2.6.4.9). This matches browser behavior but differs from parsers like Python's lxml, which does not insert . As a result, XPath expressions like //table/ or //table// may return different results than lxml for the same input HTML. To avoid this discrepancy, use explicit tags in your HTML or account for the implicit element in your XPath expressions. XPath Expressions Skyscraper is capable of parsing XPath strings and applying them to HTML documents. Below is a basic xpath example. Please see the docs for more examples. Supported XPath Features Below is a non-exhaustive list of all the features that are currently supported. 1. Basic xpath steps: /html/body/div , //div/table//span 1. Attribute selection: //div/@class 1. Text selection: //div/text() 1. Wildcard node selection: //bo","default_branch":null,"files":null,"tree":[],"storefront":"/r/James-LG","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/James-LG/Skyscraper/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."}