Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Scrapy

$ scrapy Official Med Risk
Scrapy · Browser & Web · BSD-3-Clause · macos / linux / windows

Scrapy (scrapy) is a mature, extensible Python crawling and scraping CLI featuring scrapy crawl with built-in JSON/JSONL/CSV feed exports (-O out.json), scrapy runspider for single-file spiders, scrapy fetch, and an interactive scrapy shell for CSS/XPath selector debugging.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
pip install Scrapy
CLI vs MCP Decision CLI Only

Executes asynchronous Twisted-based spider pipelines and structured feed exports locally; orthogonal to interactive MCP browsers.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports -O out.json/out.jsonl, --nolog, and -s inline settings overrides, though scrapy shell is interactive and logs go to stderr.

  • Built-in -O feed export (json, jsonlines, csv) and --nolog
Trust & Safety 21 / 25

Respects robots.txt when configured, supports AUTOTHROTTLE_ENABLED and CLOSESPIDER_PAGECOUNT caps, and writes only local feed files.

  • Built-in ROBOTSTXT_OBEY, AutoThrottle, and CLOSESPIDER_* bounds
Setup & Portability 12 / 15

Cross-platform via PyPI/conda, though compiling C extensions (lxml, cryptography) on minimal OSes can require build tools.

  • Available via pip install Scrapy across macOS, Linux, Windows
Utility & Efficiency 14 / 15

Full async crawling engine with CSS/XPath selectors, item pipelines, retries, and caching out of the box.

  • Async Twisted engine with built-in selectors and feed exporters
Maintenance & Lineage 9 / 10

Long-standing official open-source framework (scrapy/scrapy) under BSD-3-Clause with active maintenance.

  • Mature BSD-3-Clause project with regular releases
Docs & Verifiability 9 / 10

Extensive official documentation (docs.scrapy.org) covering CLI commands, settings, and feed exports.

  • Comprehensive CLI and settings reference at docs.scrapy.org

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Project settings and optional proxy/API credentials live in settings.py or env vars read by user spider code.

Side Effects
Read-Only Local Write
Cost & Quotas

Free, BSD-3-Clause open-source Python package.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Scrapy Agent Rules
- Never run `scrapy shell` (interactive REPL) inside headless agent shells.
- Prefer `-O <file>.json` (overwrite) or `.jsonl` over `-o` (append, which produces invalid JSON).
- Respect `ROBOTSTXT_OBEY=True` and set `-s CLOSESPIDER_PAGECOUNT=<n>` to bound crawls.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run a standalone spider and overwrite JSON output
scrapy runspider spider.py -O items.json --nolog

Executes spider.py non-interactively with --nolog and overwrites items.json cleanly.

Fetch a single URL using Scrapy downloader
scrapy fetch --nolog https://example.com

Downloads a single page's HTML to stdout without project scaffolding or log noise.

Controlled Writes & Previews

Crawl project spider to JSON Lines with page cap
scrapy crawl myspider -O out.jsonl -s CLOSESPIDER_PAGECOUNT=50

Runs myspider capped at 50 pages and writes clean JSON Lines to out.jsonl.

Strengths for Agents

  • + -O out.jsonl and -s setting overrides enable deterministic, bounded batch scraping.
  • + Built-in CLOSESPIDER_PAGECOUNT and AUTOTHROTTLE_ENABLED guard against runaway crawls.

Caveats & Pitfalls

  • ! Using lowercase -o on .json files appends root objects and creates malformed JSON; use -O or .jsonl.
  • ! Static HTTP downloader by default; JS-heavy SPAs require plugins like scrapy-playwright.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI