Scrapy extension to store info in storage service
Project description
A scrapy extension to store requests and responses information in storage service.
Installation
You can install scrapy-pagestorage using pip:
pip install scrapy-pagestorage
You can then enable the middleware in your settings.py:
SPIDER_MIDDLEWARES = { ... 'scrapy_pagestorage.PageStorageMiddleware': 900 }
How to use it
Enable extension through settings.py:
PAGE_STORAGE_ENABLED = True PAGE_STORAGE_ON_ERROR_ENABLED = True
Configure the exension through settings.py:
PAGE_STORAGE_MODE = "VERSIONED_CACHE" PAGE_STORAGE_LIMIT = 100 PAGE_STORAGE_ON_ERROR_LIMIT = 100
The extension is auto-enabled for auto-spiders (SHUB_SPIDER_TYPE in [auto, portia]).
Settings
PAGE_STORAGE_MODE
Default: None
A string which specifies if the extension will store information using cache store or versioned cache store (set PAGE_STORAGE_MODE=”VERSIONED_CACHE” to use versioned one).
PAGE_STORAGE_LIMIT
An integer to set a limit of visited pages amount to store.
PAGE_STORAGE_ON_ERROR_LIMIT
An integer to set a limit for page errors amount to store.
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
Built Distribution
File details
Details for the file scrapy-pagestorage-0.1.0.tar.gz
.
File metadata
- Download URL: scrapy-pagestorage-0.1.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61c7198c4b8218c29c7b1c25ebf20f72f1e34481c964224bf9efcee4b39d1320 |
|
MD5 | 556318b2b231a2e971fdea88ccdc528a |
|
BLAKE2b-256 | 4746fac842975c83473db3f7a7713cedd100f462b95be8efd1f968fec811a20b |
File details
Details for the file scrapy_pagestorage-0.1.0-py2-none-any.whl
.
File metadata
- Download URL: scrapy_pagestorage-0.1.0-py2-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e2d22272a9eac091787df75e4467f33ff9c1173e1d8feb9444d357edad6919 |
|
MD5 | 9d6cd52aa3c907d516c44522e17f9455 |
|
BLAKE2b-256 | 32fe7d6eb3ceb7d5637ae363642c534ac2d7669737af24d49b5422ec2063ec6b |