proxy-servant is your best friend that will give you a working proxy every time you request it
Project description
proxy-servant
proxy-servant is your best friend that will give you a working proxy every time you request it
Why and For What?
Proxy-servant developed for a community from a part of that community My main goal was to develop a package that would accept a set of proxy data, send thousands http requests throught those proxies, and know which ones were alive
Which proxies are supported?
- SOCKS5
- SOCKS4
- HTTP
How to use?
Load dataset
http://127.0.0.1
http://127.0.0.2
http://127.0.0.3
http://127.0.0.4
dataset.txt
import proxy_servant
data = proxy_servant.FileDataSource("./proxies.csv")
Instantiate checker
pc = proxy_servant.BasicProxyChecker(data, "https://google.com", timeout=aiohttp.ClientTimeout(connect=8))
Send requests
If you in async function
check_result = await pc.check()
or
import asyncio
check_result = asyncio.run(pc.check())
Now you have list with result of proxy-checking
Iterate over working proxy
pp = proxy_servant.BasicProxyProvider(check_result) # filtering and saves only working proxies
pp.get_all()
# or
next(pp)
# or
for proxy in pp:
pass
To manage an infinite or finite loop, use the remove_proxy_after_use
parameter in BasicProxyProvider
Change log
[1.0.0] - 2022-12-03
Added
- Improved README
[0.0.1] - 2022-11-04
Added
- Initial version
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
proxy-servant-1.0.0.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for proxy_servant-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57af3da707fed5ac303ab07e7006e37ada133463b4868e8c04b0e6199564f222 |
|
MD5 | 887fc364339dc0e63a9a70486cca48a9 |
|
BLAKE2b-256 | bed11acc07c5849a6abe57c303293f439e2a844236ebac937323f766a215a6ce |