scrapy-tor-downloader
Scrapy middleware with TOR support for more robust scrapers or anonymous scraping.
Dependencies :globe_with_meridians:
Installation :inbox_tray:
This is a python package hosted on pypi, so to install simply run the following command:
pip install scrapy-tor-downloader
Settings
TOR_PROXY_ENABLED
Whether TOR is used to proxy any request (defaults to false).
Meta field to enable/disable this per request is: tor_proxy_enabled
TOR_FALLBACK_ENABLED
Whether TOR is used when a request fails as a fallback (defaults to true).
Meta field to enable/disable this per request is: tor_fallback_enabled
TOR2WEB_PROXY
Whether a tor2web proxy is used for onion address. The value of this setting is the domain for the proxy.
Meta field to add this per request is: tor2web_proxy
tor_reset_session
Whether to reset the TOR session before processing the request. This field only exists in the meta on the request as tor_reset_session and is a boolean.
Usage example :eyes:
In order to use this plugin simply add the following settings and substitute your variables:
DOWNLOADER_MIDDLEWARES = {
"tormiddleware.middleware.TORDownloaderMiddleware": 631
}
This will immediately allow you begin using TOR as a fallback when one of your requests fail. In order to use it as a proxy you can add the following to your settings:
TOR_PROXY_ENABLED = True
This will make every request hit TOR for a response. If you have turned the proxy on the TOR fallback is ignored, however if it is off the fallback is still on by default, which means if a request returns an error it will be tried again on TOR. In order to turn this off add the following to your settings:
TOR_FALLBACK_ENABLED = False
If you want to make use of tor2web proxies for onion addresses, you can add it to the settings like so:
TOR2WEB_PROXY = "https://onion.moe"
License :memo:
The project is available under the MIT License.
Metadata
Release files for scrapy-tor-downloader 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scrapy-tor-downloader-1.0.4.tar.gz | 4.9 kB | Without provenance | Details |
Release files / scrapy-tor-downloader-1.0.4.tar.gz
| Download URL | scrapy-tor-downloader-1.0.4.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
421b2fbdddca913be84878fc99cf1693bf3ef67378877d3e421d24a719fb6873
|
|
BLAKE2b-256 checksum How to use checksums |
e79a6eb4d8049d88ee7ebdfa59cb9021b2fc06a9f3432d89b266e6a081a4a859
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for scrapy-tor-downloader 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.