Git Product home page Git Product logo

proxlist's Introduction

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

proxlist's People

Contributors

justintime50 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

proxlist's Issues

Exception

Exception: No working proxies were found at this time, please try again later.

Exception

No working proxies were found at this time, please try again later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.