Skip to main content

Pipeline to save scrapy item field attachment to qiniu

Project description

Pipeline to save scrapy item field attachment to qiniu

Installation

Install scrapy-save-to-qiniu using pip::

$ pip install scrapy-save-to-qiniu

Configuration

  1. Add the settings.py of your Scrapy project like this:
QINIU_AK = ''
QINIU_SK = ''
QINIU_BUCKET = ''
QINIU_DOMAIN = ''
QINIU_DEL_SRC = True
QINIU_FIELDS = [
    'pdf_url',
]
  1. Enable the pipeline by adding it to ITEM_PIPELINES in your settings.py file and changing HttpCompressionMiddleware priority:
ITEM_PIPELINES = {
    'scrapy_save_to_qiniu.pipelines.SaveToQiniuPipeline': -1,
}

The order should before your persist pipeline such as save to database and after your preprocess pipeline.

Usage

no need to change your code

Getting help

Please use github issue

Contributing

PRs are always welcomed.

Changes

0.1.0 (2020-12-26)

Initial release

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-save-to-qiniu-0.2.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

scrapy_save_to_qiniu-0.2.0-py2.py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 2 Python 3

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