SSLProxies
Get free working proxy from https://www.sslproxies.org/ and use it in your script
This is a port/rewrite of free-proxy with additional features and validations.
SSLProxies pulls a list of free proxies from sslproxies.org
You can choose to select a random proxy, or select a specific proxy by a set of criteria.
SSLProxies also features a ProxyManager that can be used to cache and reuse proxies, including managing their working status.
Proxies are returned as objects with the following properties:
- ip: the IP address of the proxy
- port: the port of the proxy
- url: the full url of the proxy (this will always be HTTP regardless of the HTTPS status)
- country: the country of the proxy
- anonymity: the anonymity of the proxy
- https: whether the proxy supports https
- last_checked: the last time the proxy was checked
- last_working: the last time the proxy was working
- is_working: whether the proxy is working
- requests_dict: a pre-formatted dictionary object to be passed into a Requests library request
Requirements
- Python3
- Request library
- BeautifulSoup library
Installation
pip install sslproxies
Usage with examples
Get a random proxy:
from sslproxies import ProxyManager
proxy = ProxyManager().get_new_proxy()
or
from sslproxies import get_proxy
proxy = get_proxy()
Mark a proxy as working:
from sslproxies import ProxyManager
proxy = ProxyManager().get_new_proxy()
manager = ProxyManager()
manager.mark_proxy_as_working(proxy)
Options
from sslproxies import get_proxy
proxy = get_proxy(countries=['US'], anonymous=True)
countriesparameter
Get a proxy from a specified list of countries. If there is no countries specified, proxies from all countries will be considered. Defaultcountries=None.
proxy = get_proxy(countries=['US', 'BR', 'United States', 'Germany'])
verifyparameter
Return only a proxy that works (keeps testing proxies until one works). Defaultverify=False.
proxy = get_proxy(verify=True)
timeoutparameter
During verification, if test site doesn't respond in X number of seconds, the proxy is considered non-working. Defaulttimeout=0.5.
proxy = get_proxy(timeout=1)
randparameter
Pull a random proxy, rather than the first one on the list. Defaultrand=True.
proxy = get_proxy(rand=True)
anonymousparameter
Return only those proxies that are marked as anonymous. Defaultanonymous=False.
proxy = get_proxy(anonymous=True)
You can combine parameters:
proxy = get_proxy(country_id=['US', 'BR'], timeout=0.3, rand=True, verify=True)
If there is no proxy matching all criteria, get_proxy returns None.
These same options are available in get_new_proxy, get_non_working_proxy and get_cached_proxy via the ProxyManager.
Metadata
Release files for sslproxies 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 | |
|---|---|---|---|
| sslproxies-0.1.0.tar.gz | 19.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sslproxies-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.4 kB
Release files / sslproxies-0.1.0.tar.gz
| Download URL | sslproxies-0.1.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50bdc5b81bb3cbb17b857a895151adc72ae426eb83e1589914ecb6c43aa3561f
|
|
BLAKE2b-256 checksum How to use checksums |
e6c78353e7c97917f8ee06a32b701e5e21c0836801f3226617c14a19f2ca337f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / sslproxies-0.1.0-py3-none-any.whl
| Download URL | sslproxies-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac2aafe66823da65bd7b28708ebdd35d3d710b561ea25593c5feaff7bd59052e
|
|
BLAKE2b-256 checksum How to use checksums |
85886599a1e35c0592077471598707b1d502a38c1bb0e97aca6de352ef12928e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|