A wrapped version of requests. Allow automatic rotate proxy with limit of each endpoint
Project description
requests-proxy-rotation
A wrapped version of requests. Allow automatic rotate proxy with limit of each endpoint
How to install
pip install git+https://github.com/phan123123/requests_proxy_rotation
How to use
from requests_proxy_rotation import RequestsWrapper
proxylist = ["socks5://123.123.123.123:8080","socks4://1.2.3.4:1234"]
verify_endpoint = "http://example.com" # using this endpoint to check proxy is alive or not
requests = RequestsWrapper(proxylist=proxy_list,verify_endpoint=verify_endpoint)
requests.add_rotator("domain_01",limit_times = 5) # domain_01 API with limit 5 times for each IP.
response = requests.get("http://domain_01/get_endpoint")
response = requests.post("http://domain_01/post_endpoint", data="test")
response = requests.request("method","http://domain_01", ...)
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
Close
Hashes for requests_proxy_rotation-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25be72be59979fa21f82c87c861a6de43c62b59be55d84b03b5e72ef02e72923 |
|
MD5 | 71ff8bcbc41dc096e95c52890dfbe1d9 |
|
BLAKE2b-256 | 6d7fd2dfe926aa339275c26cc0c5862444a8515b0a94a8398b9c8aafd2576668 |
Close
Hashes for requests_proxy_rotation-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c95c6aa60ef3e78db53ec40bfe5b4bef8ecd8a59b56345ff3fa2ca8f96050d3a |
|
MD5 | ea1b29d989241b3bd4600c14f0fd0dcf |
|
BLAKE2b-256 | c35036ec4eae2368ca95f7987f88b5755cdeb3f70f25589324385a16961bbbb4 |