Skip to main content

py_proxy

Python proxy manager.
Please use diligently and respectfully.
Always respect a website's ROBOTS.txt

compatibility

This library is compatible with python 3

dependencies

This library is dependant on:

  • requests
  • beautifulsoup4

install

pip install py_proxy

Features

  • Automatically fetches up to 80 proxies
  • Cycle between proxies easily
  • Test a proxy and get details about the proxy
  • Validate all fetched proxies concurrently
  • Format proxies for use with requests library

Examples

from proxy import Proxy

proxy = Proxy()

# getting the current proxy
cur_proxy = proxy.proxy

# testing the current proxy
res = proxy.test_proxy(cur_proxy)

if res == 1:
	print("success!")
else:
	print("failure!")

# cycling the proxy to a new proxy from the pool
proxy.cycle()

# filtering proxies by a country code
proxy = Proxy("US") #gets US only proxies from the pool

# automatically validating proxies after fetching them
proxy = Proxy(validate_proxies=True)

# format a proxy for use with requests library
ip = "100.100.100.100" #example ip, not real
port = "1989" #example port, not real
addr = [ip, port]
proxies = proxy.format_proxy(addr) #returns the requests proxies dictionary

# validating all proxies concurrently
proxy.validate_proxies()

# cycling through valid only proxies
proxy.cycle(valid_only=True)

License

You're free to use this package which is licensed under the MIT-LICENSE

Contributing

Contribution is always appreciated.
If you are contributing please remember to update the README.
If your contribution is accepted you will be credited for it.

Original Author

Dylan Randall aka HOWZ1T

Contributors

Berkkarahan - added multi-thread proxy validation

Release files for py-proxy 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-proxy 0.2.6
File Size Uploaded
py_proxy-0.2.6.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-proxy 0.2.6
File Interpreter ABI Platform
py_proxy-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / py_proxy-0.2.6.tar.gz

Download URL py_proxy-0.2.6.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c35b2dc75e8610dd67e01ecf6369d7323d96c9425335104d88b570a9dfd70f28
BLAKE2b-256 checksum
How to use checksums
aa31f3e1c2dc1f3d51fb6e7dc5f8bb11d93666e1fe4ac785bf7d3c3e6d81fe68
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.1 CPython/3.7.3

Release files / py_proxy-0.2.6-py3-none-any.whl

Download URL py_proxy-0.2.6-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bc4078b682eb2436b68742ae79de93e5f6f7e29ef3a2652d5201658e0fb371f
BLAKE2b-256 checksum
How to use checksums
f85241a1544a36fcea47bd91849cda6717e7cf5cb83ed54b01d0ce5c583a72aa
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.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files

0.2.3

2 release files

0.2.2

1 release file

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page