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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file scrapy-save-to-qiniu-0.2.0.tar.gz.

File metadata

  • Download URL: scrapy-save-to-qiniu-0.2.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for scrapy-save-to-qiniu-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a6afcb75382514b94d6ee0a149fddf2a5a152b43ea30810b566b31d68dde2df4
MD5 314c16577b9661982e095d9d8a2b8dc7
BLAKE2b-256 846e1624f900aa5cb8445a7873fb19a37a7ed278b7fbf38a7370866fb85ad1c5

See more details on using hashes here.

File details

Details for the file scrapy_save_to_qiniu-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: scrapy_save_to_qiniu-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for scrapy_save_to_qiniu-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8bf24b86ebe41a509994586aa506313e03fa98ab03724a14721ed3db46fb453a
MD5 e394def20ece0305713bc5ce68a6b17d
BLAKE2b-256 f82dd9cca811410f668ffc3d2c29b95d47c2d0f8f897fa06aa8ed56c10c73c33

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