Skip to main content

Crawlr: an AI-powered, self-healing web scraper with an e-commerce price-intelligence vertical

Project description

crawlr

crawlr

An AI-powered, self-healing web scraper for e-commerce price & stock monitoring.

PyPI version Python versions License: MIT Website

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crawlr-0.1.1.tar.gz (42.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crawlr-0.1.1-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

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

Hashes for crawlr-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ac9ac40ebac42a719796e782fa142e513dceb458a800dd78fef6c399a1e9a216
MD5 b70410d5bb3deb4d479401e743a01a28
BLAKE2b-256 0bf0f65d8929d3aa030ff9522c628e2ff040c7c03d236dcf7035995caf9fd7bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for crawlr-0.1.1.tar.gz:

Publisher: publish.yml on ardfaiyaz/crawlr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for crawlr-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c43270a12f3875b79b7328d111926cb1932b092a057ba9ec67537699d6bc6ebf
MD5 371fc284f4a64481262d6e6fe788b669
BLAKE2b-256 8743692345ecca420be533e8a5649c6f7284a2b7e0b8689983f44b2251ac0dfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for crawlr-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ardfaiyaz/crawlr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page