wxpath
Declarative web crawling in XPath
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
wxpath is a declarative web crawler where web crawling and scraping are expressed directly in XPath.Instead of writing imperative crawl loops, you describe what to follow and what to extract in a single expression: import wxpath # Crawl, extract fields, build a Wikipedia knowledge graph path_expr = """ url('https://en.wikipedia.org/wiki/Expression_language') ///url(//main//a/@href[starts-with(., '/wiki/') and not(contains(., ':'))]) /map{ 'title': (//span[contains(@class, "mw-page-title-main")]/text())[1] ! string(.), 'url': string(base-uri(.)), 'short_description': //div[contains(@class, 'shortdescription')]/text() ! string(.), 'forward_links': //div[@id="mw-content-text"]//a/@href ! string(.) } """ for item in wxpath.wxpath_async_blocking_iter(path_expr, max_depth=1): print(item) The key addition is a `url(...)` operator that fetches and returns HTML for further XPath processing, and `///url(...)` for deep (or paginated) traversal. Everything else is standard XPath 3.1 (maps/arrays/functions).Features:- Async/concurrent crawling with streaming results- Scrapy-inspired auto-throttle and polite crawling- Hook system for custom processing- CLI for quick experimentsAnother example, paginating through HN comments (via "follow=" argument) pages and extracting data: url('https://news.ycombinator.com', follow=//a[text()='comments']/@href | //a[@class='morelink']/@href) //tr[@class='athing'] /map { 'text': .//div[@class='comment']//text(), 'user': .//a[@class='hnuser']/@href, 'parent_post': .//span[@class='onstory']/a/@href } Limitations: HTTP-only (no JS rendering yet), no crawl persistence. Both are on the roadmap if there's interest.GitHub: https://github.com/rodricios/wxpathPyPI: pip install wxpathI'd love feedback on the expression syntax and any use cases this might unlock.Thanks!
HN · launched Jan 14, 2026 · 64 upvotes (top 16%) · 0 views
Niche: web scraping tools and apis · 172 launches, 12 in the last 7 days ▲ +9% · Explore this niche →
Category and tags
- Horizontal
- Search & retrieval
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 172 launches in web scraping tools and apis →
Could you build this?
Yes It is a Python library parsing HTML using standard XPath engines (like lxml) and chaining network requests recursively based on XPath query evaluations.
Discussion
9 comments analyzed.
Competitors mentioned: Scrapy and Crawlee frameworks, Ferret declarative web crawling framework, Xidel, LLMs for web content extraction, lxml/XPath
Concerns raised: LLMs have token limits and cost issues, XPath lacked crawling capabilities
Competitors
Other products that read as similar to this one : 100 launches clear the similarity bar, closest 8 shown.
Attention rank: #11 of 101 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 70 days after the earliest competitor.
- PageSieve, a web scraping browser extension · hn · 2026-08-16 · 17 upvotes · similarity 0.45
- SCRAPR · ph · 2026-03-09 · 259 upvotes · similarity 0.45
- Crawio · ph · 2026-09-30 · 1 upvotes · similarity 0.41
- Extracto · ph · 2026-11-11 · 2 upvotes · similarity 0.41
- Contomatix Sitemap URL Extractor · ph · 2026-10-12 · 1 upvotes · similarity 0.40
- WebEXE · ph · 2026-10-16 · 1 upvotes · similarity 0.40
- JSPath · ph · 2026-09-19 · 2 upvotes · similarity 0.39
- SEOAISpiderX · ph · 2026-11-06 · 1 upvotes · similarity 0.39
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.