scrapy-random-useragent-pro
Random UserAgent middleware for Scrapy.
You can chose your preferred ua in request.meta[desktop,mobile,bot].
Install
pip install scrapy-random-useragent-pro
Usage
settings.py
RANDOM_UA_ENABLED = True
RANDOM_UA_DEFAULT_TYPE = 'mobile'
# always change user-agent
RANDOM_UA_OVERWRITE = False
DOWNLOADER_MIDDLEWARES = {
'scrapy_random_useragent_pro.middleware.RandomUserAgentMiddleware': 100,
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,# important
}
In your code
yield Request('http://scrapytest.org/', meta={'ua': 'mobile'})
Metadata
Release files for scrapy-random-useragent-pro 1.0.0
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 | Actions |
|---|---|---|---|---|
| scrapy-random-useragent-pro-1.0.0.tar.gz | 3.9 kB | Without provenance | Details for scrapy-random-useragent-pro-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scrapy_random_useragent_pro-1.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for scrapy_random_useragent_pro-1.0.0-py2.py3-none-any.whl |
Total release size: 9.2 kB
Release files / scrapy-random-useragent-pro-1.0.0.tar.gz
| Download URL | scrapy-random-useragent-pro-1.0.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4b1ef90ae35ec75d075a635db76588ead271f5a0f60159ffe88ce77266dc69d
|
|
BLAKE2b-256 checksum How to use checksums |
58a6054757f52b10c2bb861297ece1bceb70b098f066e77b0aa8c7b1c6da66b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5
|
Release files / scrapy_random_useragent_pro-1.0.0-py2.py3-none-any.whl
| Download URL | scrapy_random_useragent_pro-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c379972043ba140c016f9c759457cbac5fc397bcaec709590122e6f0f58896a0
|
|
BLAKE2b-256 checksum How to use checksums |
19e6863bce05bf8d5b380c7b6c9b24a08c9b7a7d509797d3da0ec5c8b994a0b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5
|
Security for scrapy-random-useragent-pro 1.0.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.