Crawlr: an AI-powered, self-healing web scraper with an e-commerce price-intelligence vertical
Project description
crawlr
An AI-powered, self-healing web scraper for e-commerce price & stock monitoring.
Website ·
PyPI ·
pip install crawlr
Crawlr uses an LLM (or a free offline heuristic) only to generate and repair CSS selectors, then extracts pages deterministically with those cached selectors. When a site changes its layout and the selectors break, Crawlr detects it and regenerates them automatically — so your monitoring never silently dies.
- Runs free & offline — no API key required; add an OpenAI/Anthropic key for higher accuracy.
- Self-healing — survives redesigns that break traditional scrapers.
- Price & stock alerts — via webhook, Slack, or email, on the trigger you choose.
- General-purpose — e-commerce ships in; add new verticals as simple YAML.
Install
pipx install crawlr # or: pip install crawlr
Quickstart
crawlr watch "https://store.com/product/123" --target 25 # track price + stock
crawlr watchlist # current price, movement, stock
crawlr monitor --daemon # keep checking in the background
crawlr serve # optional local dashboard
Alert triggers
Pick one per watch with --trigger (or in the dashboard):
| Trigger | Alerts when |
|---|---|
any_change |
any watched field changes |
price_drop |
the price goes down |
price_below |
price is at/below your target |
price_above |
price is at/above your target |
back_in_stock |
the item becomes available |
out_of_stock |
the item sells out |
For richer logic, run crawlr init to create an editable crawlr.rules.yaml that maps
circumstances to actions (and overrides per-watch triggers):
default_action: ignore
rules:
- when: price_drops_below
amount: 25
action: alert
- when: back_in_stock
action: alert
Custom schemas (no code)
Add new verticals by dropping a YAML file into your schema directory:
name: jobs
item_selector: ".job-card"
fields:
- name: title
description: the job title
type: text
required: true
- name: salary
description: annual salary
type: number
Then crawlr scrape <url> --schema jobs. List schemas with crawlr schemas.
Configuration
Set via environment variables or a .env file:
| Variable | Default | Description |
|---|---|---|
CRAWLR_LLM_PROVIDER |
none |
openai, anthropic, or none (offline heuristic) |
CRAWLR_LLM_API_KEY |
— | API key for the chosen provider |
CRAWLR_DATABASE_URL |
— | postgresql://... to use Postgres instead of SQLite |
CRAWLR_ALERT_WEBHOOK |
— | Webhook URL for change alerts |
CRAWLR_ALERT_SLACK |
— | Slack incoming-webhook URL |
CRAWLR_PROXIES |
— | Comma-separated proxy URLs to rotate |
CRAWLR_RESPECT_ROBOTS |
true |
Honor robots.txt |
Development
pip install -e '.[dev]'
pytest # offline test suite
ruff check . # lint
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crawlr-0.1.1.tar.gz.
File metadata
- Download URL: crawlr-0.1.1.tar.gz
- Upload date:
- Size: 42.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac9ac40ebac42a719796e782fa142e513dceb458a800dd78fef6c399a1e9a216
|
|
| MD5 |
b70410d5bb3deb4d479401e743a01a28
|
|
| BLAKE2b-256 |
0bf0f65d8929d3aa030ff9522c628e2ff040c7c03d236dcf7035995caf9fd7bd
|
Provenance
The following attestation bundles were made for crawlr-0.1.1.tar.gz:
Publisher:
publish.yml on ardfaiyaz/crawlr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crawlr-0.1.1.tar.gz -
Subject digest:
ac9ac40ebac42a719796e782fa142e513dceb458a800dd78fef6c399a1e9a216 - Sigstore transparency entry: 2172977817
- Sigstore integration time:
-
Permalink:
ardfaiyaz/crawlr@2bf9e01cc1aa9747d5f59b8d5e1d30bca5e2a210 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ardfaiyaz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2bf9e01cc1aa9747d5f59b8d5e1d30bca5e2a210 -
Trigger Event:
push
-
Statement type:
File details
Details for the file crawlr-0.1.1-py3-none-any.whl.
File metadata
- Download URL: crawlr-0.1.1-py3-none-any.whl
- Upload date:
- Size: 55.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c43270a12f3875b79b7328d111926cb1932b092a057ba9ec67537699d6bc6ebf
|
|
| MD5 |
371fc284f4a64481262d6e6fe788b669
|
|
| BLAKE2b-256 |
8743692345ecca420be533e8a5649c6f7284a2b7e0b8689983f44b2251ac0dfd
|
Provenance
The following attestation bundles were made for crawlr-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ardfaiyaz/crawlr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crawlr-0.1.1-py3-none-any.whl -
Subject digest:
c43270a12f3875b79b7328d111926cb1932b092a057ba9ec67537699d6bc6ebf - Sigstore transparency entry: 2172977823
- Sigstore integration time:
-
Permalink:
ardfaiyaz/crawlr@2bf9e01cc1aa9747d5f59b8d5e1d30bca5e2a210 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ardfaiyaz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2bf9e01cc1aa9747d5f59b8d5e1d30bca5e2a210 -
Trigger Event:
push
-
Statement type: