Skip to main content

Find fetch & validate free proxies fast.

Project description

Python PyPI License: Apache 2.0

Ballyregan 🔷

Find fetch & validate free proxies fast.


How does it work?

Ballyregan fetches the proxies from list of built in providers.

Provider - any website that serves free proxy lists (e.g https://free-proxy-list.net).

You can write and append your own custom providers and pass it to the ProxyFetcher class as attribute.

Note
Every custom proxy provider must implement the IProxyProvider base interface.


Behind the scenes

Ballyregan uses greenlets.
Fetching a proxy is an IO bound operation which depends on network,
and greenlets provide concurrency, so by using them we are able validate thousands of proxies efficiently.


Install

pip install ballyregan

Usage

Package 📦

Create a fetcher instance

from ballyregan import ProxyFetcher

# Setting the debug mode to True, defaults to False
fetcher = ProxyFetcher(debug=True)

Get one proxy

proxy = fetcher.get_one()
print(proxy)

Get multiple proxies

proxies = fetcher.get(limit=4)
print(proxies)

Get proxies by filters

from ballyregan.models import Protocols, Anonymities

proxies = fetcher.get(
  limit=4,
  protocols=[Protocols.HTTPS, Protocols.SOCKS5],
  anonymities=[Anonymities.ELITE]
)
print(proxies)

CLI 💻

Get all proxies

ballyregan get --all

Get one proxy

ballyregan get --all

Use debug mode

ballyregan --debug get [OPTIONS]

Format output to json

ballyregan get -o json

Get proxies by limit

bellyregan get -l 4

Get proxies by filters

bellyregan get -l 4 -p https -p socks5 -a elite

Author

👤 Idan Daniel

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Idan Daniel.
This project is Apache License Version 2.0 licensed.

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

ballyregan-1.0.1.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

ballyregan-1.0.1-py3-none-any.whl (19.3 kB view hashes)

Uploaded 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