prox-checker
Async python proxy checker
Features
- Works in 2023
- No pycurl needed, OS independent
- HTTP, Socks4, Socks5
- Async
- Fast (<= 1.5kb per check)
- Checks availability and anonymity
- Secure, no data collecting
- Typed
Installation
pip install prox-checker
Usage
...
from prox_checker import ProxyChecker, ProxyProtocol, ProxyCheckerResult
async def check_my_proxies():
proxies = [
'144.24.207.98:8080',
'103.169.130.51:5678',
'198.58.126.147:51576',
'45.79.155.9:3128',
'206.220.175.2:4145',
]
working_proxies: List[ProxyCheckerResult] = await ProxyChecker().check_proxies(
proxies=proxies,
proxy_async_limit=1_000,
protocol_async_limit=3,
response_timeout=5,
)
print(working_proxies)
'''
Output:
[
<ProxyCheckerResult url=http://144.24.207.98:8080 proxy=144.24.207.98:8080 protocol=ProxyProtocol.http>,
<ProxyCheckerResult url=socks4://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks4>,
<ProxyCheckerResult url=socks5://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks5>,
<ProxyCheckerResult url=socks4://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks4>,
<ProxyCheckerResult url=socks5://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks5>
]
Leaves only anon working proxies, separated by protocols
'''
socks5_urls = [
result.url
for result in working_proxies
if result.protocol == ProxyProtocol.socks5
]
print(socks5_urls) # ['socks5://198.58.126.147:51576', 'socks5://206.220.175.2:4145']
max_bandwidth_bytes_s = ProxyChecker.estimate_max_bandwidth_bytes_s(
proxy_async_limit=1_000,
protocol_async_limit=3,
)
max_bandwidth_mb_s = max_bandwidth_bytes_s / 1024 / 1024
print(max_bandwidth_mb_s) # 4.39453125
custom_judges = [
'http://proxyjudge.us',
'http://azenv.net/',
]
custom_judges_working_proxies = await ProxyChecker(judges=custom_judges).check_proxies(
proxies=proxies,
proxy_async_limit=1_000,
protocol_async_limit=3,
response_timeout=5,
)
print(custom_judges_working_proxies) # same as first
...
Release files for prox-checker 0.1.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 | |
|---|---|---|---|
| prox_checker-0.1.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prox_checker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / prox_checker-0.1.0.tar.gz
| Download URL | prox_checker-0.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7ecf0cfd9dc69d9f8adf3a510e0c27d3b78aa285b703ad106b846f053411731
|
|
BLAKE2b-256 checksum How to use checksums |
555df4d23fc3ec72b4d7cedfea446938650fc03e9d4140992ce40d7f249bcb06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Windows/10
|
Release files / prox_checker-0.1.0-py3-none-any.whl
| Download URL | prox_checker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3029157d910b78da20f2bc82f312edc903bef2bf2b075512762dd19f768a7a06
|
|
BLAKE2b-256 checksum How to use checksums |
29fafad0f4d5e95d0e6dac4d3aa2a7ca2142e2f1b97f8ebe67c0b93e85ebade3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.0 Windows/10
|