This package provides a way to let you set different delay for different website, using the Scrapy framework.
Project description
Scrapy-Custom-Delay
Scrapy-Custom-Delay is a package that lets you set different delay for different website, using the Scrapy framework.
Install
$ pip install scrapy-custom-delay
Usage
Step 1: Use the following config values in your scrapy settings:
-
Enable the AutoThrottle extension.
AUTOTHROTTLE_ENABLED = True
-
Enable the Custom Delay Throttle by adding it to
EXTENSIONS.EXTENSIONS = { 'scrapy.extensions.throttle.AutoThrottle': None, 'scrapy_domain_delay.extensions.CustomDelayThrottle': 300, }
-
Add
{'regex': 'download delay (in seconds)'}to theDOMAIN_DELAYS.something like:
# set up custom delays per domain # if two or more regexes satisfy, the first one will be used DOMAIN_DELAYS = { r'^images.google.com*$': 1.0, r'*github*': 0.5, }
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scrapy-custom-delay-0.0.2.tar.gz.
File metadata
- Download URL: scrapy-custom-delay-0.0.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09bf394ede3602b316b143df1e634959c0f235f0fdc9d3f3b56cadb7be99978a
|
|
| MD5 |
4bdf6158a0a916affe5c3498862de195
|
|
| BLAKE2b-256 |
c35f8010bf9382f1fd8821696928e884800cc8febb5fc306a7a04818993aa437
|
File details
Details for the file scrapy_custom_delay-0.0.2-py3-none-any.whl.
File metadata
- Download URL: scrapy_custom_delay-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0cc8de6c5b744943893adb922b369f40bc412f8a65f7aa1a5d0f2574f62b590
|
|
| MD5 |
338a8f7c13c1d52338cb4a4cedc31fec
|
|
| BLAKE2b-256 |
950db79a2a22fa9a5638359ca1a5d4f9f90cd9765074e24530c18df8b2a567e9
|