Skip to main content

Scrapy Downloader Middleware that helps to integrate Scrapy with Nimble Web API.

Project description

Scrapy Nimble Middleware

scrapy-nimble is a Scrapy Downloader Middleware that helps to integrate Scrapy with Nimble Web API.

Install

You can install scrapy-nimble as a regular Python package from PyPI using:

pip install scrapy-nimble

Configuration

  1. If you don't have it yet, open an account with Nimble.

  2. Provide your credentials and enable the middleware through Scrapy settings.

    # settings.py
    NIMBLE_ENABLED = True
    
    NIMBLE_USERNAME = "username"
    NIMBLE_PASSWORD = "password"
    
  3. Add the downloader middleware to your DOWNLOADER_MIDDLEWARES Scrapy setting.

    # settings.py
    DOWNLOADER_MIDDLEWARES = {
        "scrapy_nimble.middlewares.NimbleWebApiMiddleware": 570,
    }
    

    If you have scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware enabled (it is enabled by default in DOWNLOADER_MIDDLEWARES_BASE setting with default order equal to 590), configure scrapy-nimble middleware before it.

Usage

Once the downloader middleware is properly configured, every request goes through the Nimble's Web API. There is no need to change anything in your spider's code.

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_nimble-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrapy_nimble-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file scrapy_nimble-0.0.1.tar.gz.

File metadata

  • Download URL: scrapy_nimble-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for scrapy_nimble-0.0.1.tar.gz
Algorithm Hash digest
SHA256 95fec7209979053b0eda35cead73da0d760521de9e19129eecbb96caff9bf24f
MD5 6b6ebebf91e1638b5fce4e445426f764
BLAKE2b-256 318f9605f0441b948bf34997b1a5fc7986efa5eff41d298aa071119777f74201

See more details on using hashes here.

File details

Details for the file scrapy_nimble-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: scrapy_nimble-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for scrapy_nimble-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 caae0b08b868f94997d2381cd21e45703285b51237e7ac81c45fc515c25f4b55
MD5 d034bf8b9437185cc2180a181891c9b3
BLAKE2b-256 7f977b24b7cf556953281e945e899983219b65826032dc6d2fc93c35a50072c9

See more details on using hashes here.

Supported by

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