Netweir documentation
- Getting started: install, fetch a page, write and run a spider.
- Fetching pages: query strings, logins, redirects, timeouts and certificates.
- Selecting: CSS, XPath and Beautiful Soup style queries; changing the page; elements like one you found; JMESPath over JSON; structured data, articles, Markdown and chunks for retrieval, prices, dates and the data in scripts.
- XML, feeds and CSV: XML responses, namespaces, the limits on hostile XML, XMLFeedSpider and CSVFeedSpider.
- Auto-extraction: products, listings, job postings and articles read without selectors, in the common item schema, with one wrong field pinned by a selector.
- Fields a language model reads:
netweir.llm.extract, for pages no auto-extraction type covers: describe the fields, and Claude reads them. - Item loaders: filling items as Scrapy’s loaders do, with input and output processors.
- Trying a page: the page Netweir gets, on stdout, in your browser or at a Python prompt.
- Projects:
startproject,genspider,list,parse,check(Scrapy’s contracts) andversion. - Forms, logins and APIs: POST and other methods, form submission, JSON APIs.
- Sessions and cookies: a client’s cookies, storage state files, logging in with Chrome and crawling over HTTP, several users in one crawl.
- Crawling: spiders, requests, pipelines, downloading files and images, middlewares, signals, watching a running crawl, exporters and the command line.
- Declarative spiders: items and rules that run in Rust.
- Self-healing: blocks, checkpoints, tracked selectors and repair proposals.
- One crawl, many machines: processes on several machines sharing one queue in Redis.
- Browser: drive Chrome for pages that need JavaScript.
- Netweir for AI agents:
netweir mcp, an MCP server that lets Claude, Cursor and other agents fetch pages and read them as Markdown, chunks or data. - Steps: clicks, typing, scrolling and waits a request does in Chrome before its callback, as data; coming from Zyte API, scrapy-playwright, Scrapling or Crawlee.
- A page’s environment: viewport, screen, phones, language, time zone, location, permissions and the rest, the same everywhere a site looks.
- Running spiders as a service:
netweir serve, jobs scheduled, watched and cancelled over HTTP, as with scrapyd. - Settings: every setting and its default.
The designs behind it, for anyone working on Netweir:
- design/v0.1.md: the engine, the parser and the first release.
- design/security.md: what Netweir trusts, the defences against hostile pages, and their limits.
- design/browser.md: the Chrome driver.
- design/network.md: reading what a Chrome page fetches, and blocking or changing its requests.
- design/dialogs.md: a Chrome page’s dialogs, popups and downloads.
- design/steps.md: a request’s steps in Chrome, the prior art they’re drawn from, and why they run in the engine.
- design/environment.md: a Chrome page’s screen, window, device, language, clock and place, and what was measured to keep them consistent.
- design/requests.md: requests other than GETs.
- design/fetch-policy.md: timeouts, redirects, logins and certificates, per request and per crawl.
- design/workers.md: callbacks in worker processes.
- design/cache.md: the development cache.
- design/shell.md: the fetch, view and shell commands.
- design/hooks.md: middlewares, spider middlewares, signals, from_crawler and pipeline lifecycles.
- design/exports.md: JSON, XML, cloud storage and batches.
- design/files.md: downloading the files and images items link to, through the crawl.
- design/monitoring.md: item validation and end-of-crawl checks.
- design/metrics.md: live stats, the progress line and the metrics endpoint.
- design/proxies.md: proxy pools, rotation and health.
- design/http3.md: HTTP/3 through Firefox’s own QUIC stack, what matches Firefox and what doesn’t yet.
- design/sessions.md: the cookie jar, named jars, storage state and handing cookies between Chrome and HTTP.
- design/scrapy.md: Netweir as Scrapy’s download handler.
- design/archive.md: WARC and HAR files of what a crawl fetched.
- design/helpers.md: prices, dates and the data in a page’s scripts.
- design/selecting.md: editing the tree safely,
find_similar()and JMESPath. - design/xml.md: XML in the same tree and XPath engine as HTML, namespaces, and what hostile XML may cost.
- design/loaders.md: item loaders, and why they’re Netweir’s own rather than the itemloaders package.
- design/threads.md: what kept threads from scaling on free-threaded Python, and what replaced it.
- design/content.md: finding a page’s main content, reading it as an article, Markdown, and chunks for retrieval.
- design/extraction.md: auto-extraction, its sources and field readers, and pinning a field.
- design/distributed.md: one crawl shared by many machines through Redis.
- design/serve.md: the job service.
- design/project.md: projects, generated spiders, contracts and the other Scrapy-style commands.