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.2.0.tar.gz (46.3 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.2.0-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

File details

Details for the file crawlr-0.2.0.tar.gz.

File metadata

  • Download URL: crawlr-0.2.0.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crawlr-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aaf20d155933546e5f5815924c61b88b451201dd572d8673bd7a021b5be778a7
MD5 db22584b4e92379afaf8e24a32ea4e43
BLAKE2b-256 30de7a5166975d867c178795ee9e21794ea5d365514e9fbe210983f44c286a56

See more details on using hashes here.

Provenance

The following attestation bundles were made for crawlr-0.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: crawlr-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 60.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f167e5acd9b8f352e58c6defa21aa9910960008d2d75e92f9ea4b9947b8393c4
MD5 b87a6a492f15f70fca0f2a0ae09af917
BLAKE2b-256 aa2ed5ec9ba2392b1c27a55477d597d917fdb08488e818e28891da69397e3140

See more details on using hashes here.

Provenance

The following attestation bundles were made for crawlr-0.2.0-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