Skip to main content

Fetch and export proxy listings from PROXY6.net.

Project description

px6-proxy-fetcher

Small helper that grabs your active proxies from PROXY6.net and drops them into a text file you can hand to whatever is doing the crawling. I've leaned on PX6 as my low-cost proxy pool for months; it's been steady and easy to manage, so this script wraps the one task I end up repeating the most.

installation

Install from PyPI:

pip install px6-proxy-fetcher
# want .env support? pip install px6-proxy-fetcher[dotenv]

getting started

First, grab your API key from the PROXY6.net dashboard. Then run it:

export PX6_API_KEY="your_api_key_here"
px6-proxy-fetcher --print-env

That writes proxies.txt in the current directory containing your active proxies in scheme://user:pass@host:port format. With --print-env, it also emits shell exports for PROXY_LIST (comma-separated proxy URLs) and PROXY_STRATEGY (defaults to round_robin).

Options:

  • -o path/to/file.txt - write to a different location
  • -q - quiet mode (errors only)
  • -v - verbose mode (debug output)
  • --print-env - output shell export statements
  • --timeout SECONDS - HTTP timeout for API requests (default: 30)

If python-dotenv is installed, a local .env file will be loaded automatically.

cron idea

0 */6 * * * cd /path/to/px6-proxy-fetcher && px6-proxy-fetcher -o /var/run/proxies.txt

Keep proxies.txt out of Git; it holds authenticated endpoints. The script writes it with 600 permissions so only your user can read it, and the included .gitignore already skips it.

requirements

  • Python 3.9 or later
  • A PROXY6.net account with an API key

license

MIT - see the included LICENSE file.

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

px6_proxy_fetcher-0.1.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

px6_proxy_fetcher-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: px6_proxy_fetcher-0.1.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for px6_proxy_fetcher-0.1.1.tar.gz
Algorithm Hash digest
SHA256 20d5f0314f8be6f7650b87e624255df58018e0cac5fefb4e7c84411bc239e884
MD5 ce7a91ddedc9a70b05574961f2465830
BLAKE2b-256 24474b274a01b6c789477c1256d87d81ce776fa04e532f75f43cf7f993e1deb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for px6_proxy_fetcher-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b166a7732a26d0981e07798517afd71a8e9edc3efad6fa3be21ad5b7f8265f9
MD5 751e2160ecf6f5f846919e5759b2e6b6
BLAKE2b-256 2a6a4a7e57e372d259896bd3777c43f6c44c14dc22e0e58488b79420630322c6

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