No project description provided
Project description
py-valid-proxy
В работе
Installation
pip install py-valid-proxy
Usage
from py_valid_proxy import valid_proxy
"""Valid proxy server ('alive' or 'dead')
Parameters
----------
host : str
IP Address
port : int
Port
scheme: str, optional
Scheme (default is 'http')
timeout: int, optional
Connect timeout is number of seconds (default is 5 sec.)
Returns
-------
None if proxy is 'dead'
dict if proxy is 'alive'
{
"scheme": str, # http, https
"host": str,
"port": int,
"export_address": list[str],
"anonymity": str, # transparent, anonymous, high_anonymous # noqa
"country": str # ISO Code
"response_time": float
}
"""
proxy_info = valid_proxy('8.219.97.248', 80, 'https', 10)
if proxy_info:
print('is alive')
else:
print('is dead')
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
py_valid_proxy-0.2.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for py_valid_proxy-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a19426693a07f903c0be6dc457cb94f9b6d7615d0cba100ea980892b76177c |
|
MD5 | 4541e83c514a3d7fb06e606be27df2a4 |
|
BLAKE2b-256 | 5503bd3478929b4b7a1fac788092d1df7ac1c8ce4739fc180714c37cdb7ef550 |