fake-proxy
Open source library that finds public proxies from several sources.
Usage
The package must be imported and used through it’s API.
get(amount, proxy_type)
The main function is get, which receives 2 parameters: - amount which specifies the amount of proxies required - proxy_type which specifies the type of proxy (https, http, socks4)
>>> import fake_proxy
>>> fake_proxy.get()
[{'ip': '188.166.83.20', 'port': '3128', 'country_code': 'NL', 'country': 'Netherlands', 'type': 'http'}]
>>> fake_proxy.get(amount=3)
[{'ip': '89.20.135.204', 'port': '10000', 'country_code': 'RU', 'country': 'Russian Federation', 'type': 'http'},
{'ip': '165.22.154.157', 'port': '3128', 'country_code': 'US', 'country': 'United States', 'type': 'http'},
{'ip': '62.182.206.19', 'port': '37715', 'country_code': 'RU', 'country': 'Russian Federation', 'type': 'http'}]
>>> fake_proxy.get(proxy_type='https')
[{'ip': '36.92.108.150', 'port': '3128', 'country_code': 'ID', 'country': 'Indonesia', 'type': 'https'}]
get_by_source(source_name, amount, proxy_type)
Similar to get(), but lets you specify a particular source from which to obtain a proxy. - source_name: name of the source from which to get a proxy - amount: specifies the amount of proxies required - proxy_type: specifies the type of proxy (https, http, socks4)
>>> import fake_proxy
>>> fake_proxy.get_from_source(source_name='free-proxy-list.net', amount=2, proxy_type='http')
[{'ip': '76.87.101.188', 'port': '38875', 'country_code': 'US', 'country': 'United States', 'type': 'http'},
{'ip': '62.182.206.19', 'port': '37715', 'country_code': 'RU', 'country': 'Russian Federation', 'type': 'http'}]
proxy_sources()
Returns a list with the names of all the sources from which the library fetches proxies.
>>> import fake_proxy
>>> fake_proxy.proxy_sources()
{'https': ['free-proxy-list.net'],
'socks4': ['socks-proxy.net'],
'http': ['free-proxy-list.net']}
reload()
Fetches new proxies from the proxy sources.
Sources
For the moment, the library fetches the proxies from the following sources:
Source URL |
Proxy Types |
|---|---|
HTTP, HTTPS |
|
HTTPS |
|
SOCKS4 |
Installation
Latest release through PyPI:
$ pip install fake-proxy
Development version:
$ git clone git@github.com:machinia/fake-proxy.git
$ cd fake-proxy
$ pip install -e .
Contribution
Contributions are welcome! Feel free to report bugs or open an issue if you feel a new feature is needed. Pull requests are welcome!
Metadata
Release files for fake-proxy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fake-proxy-0.1.1.tar.gz | 15.2 kB | Without provenance | Details for fake-proxy-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fake_proxy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for fake_proxy-0.1.1-py3-none-any.whl |
Total release size: 29.2 kB
Release files / fake-proxy-0.1.1.tar.gz
| Download URL | fake-proxy-0.1.1.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9d0cd98447a4fcbf2f55bb6cfcc8b84911c1da201616ab70ac21d03613fc33f
|
|
BLAKE2b-256 checksum How to use checksums |
83afe280bfddb0badd83c66a631aebf6d49afe643d8515cce847b987a3425db2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Release files / fake_proxy-0.1.1-py3-none-any.whl
| Download URL | fake_proxy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b226533e3e218497849810e54f0ba62aae9c6767715e92aaed2d3e9651439a3
|
|
BLAKE2b-256 checksum How to use checksums |
265287b1267174c95abf56b6cb0bb979db10af1d04071cebe789f182fad42866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Security for fake-proxy 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.