Skip to main content

async-rotating-proxy

Run an API on your local machine that reroutes traffic through rotating proxies.

  • Excellent for scaling your web scraping
  • Designed for page-by-page dynamic proxy switching with pyppeteer

Installation

pip install async_rotating_proxy

Usage

from async_rotating_proxy import ProxyAPI
import pyppeteer

proxies = [
  ip:port,
  ip:port,
  ip:port
]

with ProxyAPI(proxies) as api:
  url = api.format_url("http://checkip.dyndns.org")

  browser = await pyppeteer.launch()
  page = await browser.newPage()
  await page.goto(url)

Purpose

The article referenced below sums it up pretty well: "The chrome browser does not support fain-grained proxy configuration out of the box. Therefore, the following use cases are not possible when using puppeteer in combination with Google Chrome:

Using different proxies for different tabs/windows
Switching proxies without restarting the browser

This is a bit annoying, because restarting the entire browser is an expensive operation in terms of computational resources. The chrome restart takes up to two seconds (depending on the system). We ideally want to switch proxies whenever the need arises without restarting the entire chrome process. This is a common requirement when scraping websites in scale."

Reference

https://incolumitas.com/2020/12/20/dynamically-changing-puppeteer-proxies/

Metadata

Release files for async-rotating-proxy 0.0.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 async-rotating-proxy 0.0.6
File Size Uploaded Provenance Actions
async_rotating_proxy-0.0.6.tar.gz 3.9 kB Without provenance Details for async_rotating_proxy-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for async-rotating-proxy 0.0.6
File Interpreter ABI Platform Actions
async_rotating_proxy-0.0.6-py3-none-any.whl Python 3 none any Details for async_rotating_proxy-0.0.6-py3-none-any.whl

Total release size: 9.0 kB

Release files / async_rotating_proxy-0.0.6.tar.gz

Download URL async_rotating_proxy-0.0.6.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
30dcd391ce4a884a53321352a8e8258126432019ab54dc82bde0a3b6b49ef6de
BLAKE2b-256 checksum
How to use checksums
16199b3d92bd304e4a4b1815d143708bd76d3767068103b8019c0319a36930a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / async_rotating_proxy-0.0.6-py3-none-any.whl

Download URL async_rotating_proxy-0.0.6-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3f14cfa61c08b37adce84d1989d9780891d938e2b4d47ce881503551938a961
BLAKE2b-256 checksum
How to use checksums
e8742c2bfa1ed152f37616540be567b1b935f4cf8a854bc78e24e07239e827f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for async-rotating-proxy 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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