Auto Generated by os-scrapy-cookiecutter
Project description
os-scrapy-random-useragent
This project provide a Downloader Middleware to change 'User-Agent' of request headers.
Install
pip install os-scrapy-random-useragent
Usage
Settings
-
enable downloader middleware in settings.py file:
this middleware will override default Scrapy User-Agent
DOWNLOADER_MIDDLEWARES = { "os_scrapy_random_useragent.RandomUserAgentMiddleware": 543, }
-
config useragents:
-
by file:
USER_AGENTS = "./your-useragets-file"
-
by string:
USER_AGENTS = "Your-Useragent-String"
-
by list:
USER_AGENTS = ["User-Agent-01", "User-Agent-02"]
-
Unit Tests
tox
License
MIT licensed.
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
File details
Details for the file os_scrapy_random_useragent-0.0.1.tar.gz
.
File metadata
- Download URL: os_scrapy_random_useragent-0.0.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd179b467112df534d8b730e7959eba32e1eb807eba739d1e4dbc97d1b95bce |
|
MD5 | e44be3a00ca3885fbe82f2df608a6d20 |
|
BLAKE2b-256 | 060fccac29e08b4db45d79b84e1f8e64a4a571422ebdb9201bee63a1143bc788 |