Skip to main content

Similar to [scrapy-redis](https://github.com/rmax/scrapy-redis), using the database as a queue, database-based scrapy components.

Project description

scrapy-db

codecov build

Similar to scrapy-redis, using the database as a queue, database-based scrapy components.

Features

  • Distributed crawling/scraping

    You can start multiple spider instances that share a single db queue. Best suitable for broad multi-domain crawls.

  • Distributed post-processing

    Scraped items gets pushed into a DB queued meaning that you can start as many as needed post-processing processes sharing the items queue.

  • Scrapy plug-and-play components

    Scheduler + Duplication Filter, Base Spiders.

Requirements

  • Python 3.7+
  • peewee >= 3.16.0
  • Scrapy >= 2.7.0
  • pymysql >= 1.0.3

Installation

From pip

pip install scrapy-db

From GitHub

git clone https://github.com/libra146/scrapy-db.git
cd scrapy-db
python setup.py install

From poetry

poetry add scrapy-db

If you are conducting distributed crawling tasks, scraper db is a very practical scraper component that can help you complete tasks more efficiently.

Use

Clone the current project and run the example crawler in example-project to experience it.

❗️Notice

This repository is still under development and may be unstable.

Why is there this library

Because I have a huge request pool, I don't have that much memory for redis to save it, so, I thought about database, I created it with reference to scrapy-redis and it works fine.

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

scrapy_db-0.0.5.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

scrapy_db-0.0.5-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file scrapy_db-0.0.5.tar.gz.

File metadata

  • Download URL: scrapy_db-0.0.5.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1040-azure

File hashes

Hashes for scrapy_db-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e295534825f903560b27ca47018a60e7969a2899341ece2dcb136600ea50a54d
MD5 f75ac1b9c6584492fbceda55210a9b67
BLAKE2b-256 844be55fe139fc5767223f96023199a2890acbbe552ed9867b2a1739882d9ccb

See more details on using hashes here.

File details

Details for the file scrapy_db-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: scrapy_db-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1040-azure

File hashes

Hashes for scrapy_db-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d5717f1b805429f3c454dd46479e2f632949687ffdc28617af7cfe4e46ea3018
MD5 3fb8c0a6f3183053d8baeaa4e16a8f0d
BLAKE2b-256 86e8e1f1f45e8d4ca27ad891168a9535caf527c069ad9b24c12552a7096c455a

See more details on using hashes here.

Supported by

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