Scrapy
Asynchronous web crawling framework for Python with spiders, item pipelines, middlewares and scheduling.
Official Documentation ↗Scrapy 2.11+ / Python 3.8+. Check the official docs for the latest API surface.Installation
pip install scrapyMethods
No methods match this filter.
Overview
Scrapy is an asynchronous crawling framework. Spiders define how to fetch and parse pages, while middlewares, pipelines and settings handle requests, processing and storage at scale.
Core Methods
A Spider declares start URLs and a parse callback, yields items or further requests, and uses selectors to extract data. Pipelines process items and settings tune scheduling and throttling.
Usage Notes
Respect robots and rate limits, use AutoThrottle, and offload storage to pipelines. Design spiders to be restartable and idempotent for long crawls.
Common Pitfalls
Ignoring politeness settings risks IP bans. Selectors written against volatile markup break on redesigns. Running too many concurrent requests against one host can overwhelm it and trigger blocks.
Security notes
Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://docs.scrapy.org/en/latest/ · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:52:25.126Z.
- Security Understand the security implications of Scrapy defaults and how to harden them. (https://docs.scrapy.org/en/latest/)
FAQ
- How do I control crawl rate?
- Set DOWNLOAD_DELAY, concurrent requests limits and AutoThrottle in settings. Respecting rate limits and robots rules avoids bans and is expected practice.
- Where do crawled items go?
- Pipelines forward items to storage such as a database, file or feed export. Enable FEEDS to write JSON or CSV without writing a custom pipeline.
- How do I handle dynamic JavaScript pages?
- Scrapy fetches raw HTML, so client-rendered content needs a headless browser integration such as a Splash or Playwright downloader middleware.
Report a problem with this API docOpens a pre-filled issue on GitHub.