Skip to main content

a package that allows you to automatically revolve your http requests through various proxies

Project description

FreeProxyRevolver

This package provides implements requests library and automatically routes your requests through proxies, automatically revolving to the next proxy when requests become unsuccessful through it

Installation

pip3 install FreeProxyRevolver

Usage

import FreeProxyRevolver

pr = FreeProxyRevolver.Revolver()

# Use just like requests
response = pr.get("http://example.com", min_anon_level=1)
print(response.content)

# This specifies to only use anonymous proxies or better, test that they're truly anonymous, and rotate proxies a maximum of 6 times before giving up on rotating for different response code
anon_pr = FreeProxyRevolver.Revolver(min_anon_level=1, max_rotates=6, test=True)
anon_response = anon_pr.get("http://example.com", min_anon_level=1)
print(anon_response.content)

You can also specify to use a fake user agent in requests like this: pr.get("http://example.com", use_fake_ua=True). Websites will often block requests if there is not a user agent header, this will take care of that issue for you

FreeProxyRevolver.Revolver() also has a couple of parameters you can set in order to configure it. Here's a list of them all:

parameter purpose
rotate_on_code A list of http response codes that should trigger a rotation of which proxy is used. Default: [429, 403]
rotate_not_on_code A list of http response codes that should trigger a rotation of which proxy is used if the returned code is not on the list. Default: [429, 403]
max_rotates The maximum proxy rotations that should be tried before giving up on rotating proxies and just returning whatever was retrieved, regardless of response code. Default: 6
min_anon_level Specifies the minimum anonymous level proxies used must meet. Level 0: transparent (server knows your ip), Level 1: Anonymous (server know you're using a proxy, but doesn't know your real ip.), Level 2: HIA/Elite (Server doesn't know your true ip or know that you are using a proxy). Default: 0
test Specifies if proxies should be tested for if they leak your ip and claim to be anonymous.

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

FreeProxyRevolver-0.1.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FreeProxyRevolver-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file FreeProxyRevolver-0.1.1.tar.gz.

File metadata

  • Download URL: FreeProxyRevolver-0.1.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.8.1

File hashes

Hashes for FreeProxyRevolver-0.1.1.tar.gz
Algorithm Hash digest
SHA256 79d6938907bc282e038567a63218ef8b58c969d72a0e5370e3a344b14b0a0614
MD5 24a1ef0709894fe5a382e846b34706e8
BLAKE2b-256 ad91c0909fe6457c67ec03cb0f4d3aea21acffcf0424411d77ba3d3c70559eb1

See more details on using hashes here.

File details

Details for the file FreeProxyRevolver-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: FreeProxyRevolver-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.48.1 CPython/3.8.1

File hashes

Hashes for FreeProxyRevolver-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46ec69d7827fc9d1a547f286dedaf0c765889404b9009e325301623db996f87c
MD5 996713980f1ec94e0f150ef78ccf4dd1
BLAKE2b-256 564b44a1c3a7a16176c6b7e713012add7ad252612f77bf7b3335bcd3adc1e361

See more details on using hashes here.

Supported by

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