Skip to main content

Retrieve free, open-source proxy servers.

Project description

Proxlist

Retrieve free, open-source proxy servers.

Build Status Coverage Status PyPi Licence

Showcase

Finding and storing a list of proxies can be taxing - especially ones that are free and actually work. proxlist will validate and return a rotating random proxy so you don't need to keep a list of proxies or ensure the list is still valid.

Proxies are returned in the form of strings (eg: ip:port).

These proxies come from all over the world and may not be performant for a production application. Instead, you should use a paid proxy service or a self-hosted solution. This package is intended for testing purposes and there are no guarantees about where the data sent through these proxies goes or how it's handled. The list and quality of proxies rotates rapidly - your mileage may vary.

Install

# Install tool
pip3 install proxlist

# Install locally
just install

Usage

import proxlist
import requests

# Get a random proxy
proxy = proxlist.random_proxy()

# You can also filter proxies by country or google_verified
proxies = proxlist.random_proxy(country='US', google_verified=True)

# Alternatively, you could get the entire list of current proxies (and could optionally filter them like above)
proxies = proxlist.list_proxies()

# Depending on the proxy and your location in the world, you may need to adjust the timeout
# to provide the proxy enough time to route your request. Additionally, some of these proxies
# may be unstable - adding retry logic is highly recommended. Caching a working proxy is also
# a good idea with a fallback of retrying if the cached proxy no longer works or times out.
response = requests.get(
    'https://google.com',
    proxies={
        'http': f'http://{proxy}',
        'https': f'http://{proxy}',
    },
    timeout=10,
)

print(response.text)

Development

# Get a comprehensive list of development tools
just --list

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxlist-1.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

proxlist-1.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file proxlist-1.1.0.tar.gz.

File metadata

  • Download URL: proxlist-1.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for proxlist-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f5857e9be161b541b7a00c4d6661851dedbed69356630a0296f27e58d2c4ca10
MD5 0be1591c7654c06697113f320e77e7b7
BLAKE2b-256 3d7bac2a9a8504190f2eb505987f617ea850ebef19dc3760ac1d5919d9efd2c1

See more details on using hashes here.

File details

Details for the file proxlist-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: proxlist-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for proxlist-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cabdebc9f7ab1f53a80d157d5df336fbfc97a37c9d2585bb7cfeee35df73ca9b
MD5 e16d49133290493b149af6e734ad866e
BLAKE2b-256 ec66fbbc8cea6edde3af3c0c8a6ae14590e684d1598a2b5962baec9f81246f80

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page