gitwtfhub

wtf is scrapy-redis?

rmax/scrapy-redis — explained in plain English

Analysis updated 2026-06-26

5,634PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

Scrapy-Redis connects the Scrapy web scraping library to Redis so multiple crawlers can share the same URL queue and deduplication filter, enabling distributed crawling across many machines at once.

Mindmap

mindmap
  root((scrapy-redis))
    What it does
      Distributed web crawling
      Shared URL queue
      Deduplication filter
      Item pipeline
    Components
      Redis scheduler
      Dupe filter
      Item pipeline
    Tech Stack
      Python
      Redis
      Scrapy
    Use Cases
      Multi-machine crawling
      Data collection pipelines
      Post-processing workflows

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run multiple Scrapy crawlers in parallel across different machines, all drawing from the same shared Redis URL queue.

REASON 2

Track which URLs have already been crawled using Redis so your distributed scrapers never visit the same page twice.

REASON 3

Push scraped items into a Redis queue so separate post-processing scripts can consume and handle them asynchronously.

REASON 4

Pass structured JSON data with URL, metadata, and form data through the Redis queue to crawlers that need rich context per request.

What's in the stack?

PythonRedisScrapy

How it stacks up

rmax/scrapy-redisdmunozv04/isponsorblocktvopenbmb/toolbench
Stars5,6345,6325,637
LanguagePythonPythonPython
Setup difficultymoderatemoderatehard
Complexity3/53/54/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a running Redis 5.0+ server and an existing Scrapy project, configure via scrapy settings after pip install.

Released under the MIT license, use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

Scrapy-Redis adds Redis-based components to Scrapy, a Python library used for crawling websites and extracting data from them. Redis is an in-memory data store commonly used to share information quickly between multiple running processes. By connecting the two, Scrapy-Redis lets you run several crawlers at the same time, all drawing from the same shared queue of URLs to visit, which is useful when you need to collect data from many websites faster than a single process can manage. The library provides three main pieces: a scheduler that stores the crawl queue in Redis instead of in memory, a duplication filter that records which URLs have already been visited so they are not crawled twice, and an item pipeline that pushes scraped results into a Redis queue so separate post-processing scripts can pick them up. These components are described as plug-and-play, meaning you configure them in your Scrapy settings without rewriting your spiders. This particular fork also supports passing structured JSON data through the Redis queue. Each entry can include a URL, metadata, and optional form data, which the spider then reads when making requests. This extends the basic distributed crawling use case to workflows that need to pass richer context alongside each URL. The library requires Python 3.7 or newer, Redis 5.0 or newer, and Scrapy 2.0 or newer. It is installed via pip and released under the MIT license.

Yoink these prompts

Prompt 1
I have a Scrapy spider and want to scale it to run on 5 machines at once. Show me how to set up scrapy-redis so they all share the same Redis URL queue.
Prompt 2
How do I configure scrapy-redis's DupeFilter so my distributed crawlers never visit the same URL twice across different machines?
Prompt 3
Show me how to push scraped items from scrapy-redis into a Redis queue and then read them in a separate Python script for post-processing.
Prompt 4
I want to pass a URL plus extra metadata through the scrapy-redis queue. How do I structure the JSON payload and read it in my spider?

Frequently asked questions

wtf is scrapy-redis?

Scrapy-Redis connects the Scrapy web scraping library to Redis so multiple crawlers can share the same URL queue and deduplication filter, enabling distributed crawling across many machines at once.

What language is scrapy-redis written in?

Mainly Python. The stack also includes Python, Redis, Scrapy.

What license does scrapy-redis use?

Released under the MIT license, use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is scrapy-redis to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is scrapy-redis for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.