Skip to main content

proxy randomizer

Project description

proxy-randomizer Documentation Status Total Downloads Black Formater

proxy randomizer


Inpired by http-request-randomizer

proxy_randomizer is intended to use for small-meduim web scrapers/crawlers, helping to avoid temporal/permanent bans from web pages, generating random proxies to include in the requests


pip install proxy_randomizer


To use proxy_randomizer in your code, you just need to generate a RegisteredProviders instance and parse the providers.

from proxy_randomizer import RegisteredProviders

rp = RegisteredProviders()

print(f"proxy: {rp.get_random_proxy()}")

You can iterate throughout all proxies as simple as this.

from proxy_randomizer import RegisteredProviders
import requests

rp = RegisteredProviders()

for proxy in rp.proxies:

     proxies     = {"https": proxy.get_proxy()}
     response    = requests.get("", proxies=proxies)

If you need to hide your identity, you can filter the proxy list by its anonymity level.

from proxy_randomizer import RegisteredProviders
from proxy_randomizer.proxy import Anonymity

rp = RegisteredProviders()

anonymous_proxies = list(
    filter(lambda proxy: proxy.anonymity == Anonymity.ANONYMOUS, rp.proxies)

print(f"filtered proxies: {anonymous_proxies}")

There are four different anonymity levels, you can inspect them like this

from proxy_randomizer.utils import ANONYMITY_LEVELS

for level in ANONYMITY_LEVELS:

Command-line interface

If you need some quick proxy, just type this in your terminal.



This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


1.2.1 (2020-12-23)

  • Fix dependencies versions

1.2.0 (2020-12-23)

  • Refactor code

0.1.0 (2020-08-02)

  • First release on PyPI.

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

proxy_randomizer-1.2.1.tar.gz (33.6 kB view hashes)

Uploaded Source

Built Distribution

proxy_randomizer-1.2.1-py2.py3-none-any.whl (8.6 kB view hashes)

Uploaded Python 2 Python 3

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