Skip to main content

A simple package to provide http and https working proxy lists.

Project description

Free Verify Proxy

free_verify_proxy is a Python library that collects free proxies from various sources and verifies whether they are functional. It checks the reliability of proxies by making requests to multiple proxy detection servers. This library is useful for developers, researchers, and web scrapers who need working proxies for their applications.

Features

  • Scrapes free proxies from multiple public proxy lists.

  • Supports filtering proxies based on country, protocol, and anonymity level.

  • Multi-threaded proxy verification for high performance.

  • Uses multiple proxy judge URLs for accurate testing.

  • Returns a verified list of working proxies.

Proxy Sources

Public Proxy Lists (HTTP/HTTPS)

Proxy Judges/Checkers

HTTP/HTTPS

Note: The library uses many more proxy judges for better accuracy, ensuring reliable proxy verification.

Installation

You can install free_verify_proxy via pip:

pip install free-verify-proxy

or

pip install git+https://github.com/mominurr/free_verify_proxy.git

When installing free_verify_proxy using pip, the necessary dependencies (requests, curl_cffi, country_converter and beautifulsoup4) will be automatically installed along with the package. You don't need to separately install these dependencies.

Usage:

Parameters

  • countryCodes (list, optional):
    A list of country codes (ISO 3166-1 alpha-2 format) to filter proxies by location.
    Example: ["US", "IE", "FR"]
    Default: ["all"] (Includes proxies from all countries).

  • excludedCountries (list, optional):
    A list of country codes to exclude from the proxy list.
    Example: ["US", "CN"]
    Default: [] (No exclusion).

  • protocols (list, optional):
    A list of protocols to filter proxies by supported protocol type.
    Supported values: ["http", "https"]
    Example: ["http"]
    Default: ["all"] (Includes all protocol types).

  • anonymityLevels (list, optional):
    A list of anonymity levels to filter proxies by their anonymity.
    Supported values: ["transparent", "anonymous", "high", "elite"]
    Example: ["elite", "anonymous"]
    Default: ["all"] (Includes all anonymity levels).

  • number_of_threads (int, optional):
    Number of threads to use for parallel proxy verification.
    Default: 100.

  • timeout (tuple, optional):
    A timeout (connect, read) in seconds for proxy verification.
    Example: (5, 5) (5-second timeout for connection and read).
    Default: (5, 5).

Default Case (No Filters Applied):

If you don't need to apply any filters and want to retrieve and verify proxies from all countries, protocols, and anonymity levels, simply call the method without any arguments:

from free_verify_proxy import VerifyProxyLists

# Instantiate the VerifyProxyLists class
verify_proxy_lists = VerifyProxyLists()

# Retrieve the verified proxy list with no filters (includes all proxies)
verified_proxies = verify_proxy_lists.get_verifyProxyLists()

# Print the list of verified proxies
print(verified_proxies)

# Example Output:
[
  {'proxy': '3.127.121.101:80', 'countryCode': 'DE', 'protocol': 'http', 'anonymityLevel': 'elite'}, 
  {'proxy': '13.36.104.85:80', 'countryCode': 'FR', 'protocol': 'http', 'anonymityLevel': 'elite'},
  ...
  {'proxy': '15.236.106.236:3128', 'countryCode': 'FR', 'protocol': 'https', 'anonymityLevel': 'high anonymous'}
]

Custom Case (With Filters Applied):

You can also customize the filters to narrow down the list of proxies. Below is an example of how to filter proxies by country code, protocol, anonymity level, and more:

from free_verify_proxy import VerifyProxyLists

# Instantiate the VerifyProxyLists class
verify_proxy_lists = VerifyProxyLists()

# Retrieve the verified proxy list based on specific filters (optional)
verified_proxies = verify_proxy_lists.get_verifyProxyLists(
    countryCodes=["US", "FR"],           # Filter proxies by country codes (e.g., "US", "FR")
    protocols=["http", "https"],         # Filter proxies by protocol (e.g., "http", "https")
    anonymityLevels=["elite"],           # Filter proxies by anonymity level (e.g., "elite")
    excludedCountries=["CN"],            # Exclude proxies from specific countries (e.g., "CN")
    number_of_threads=150,               # Use 150 threads for parallel verification
    timeout=(5, 5)                       # Set connection and read timeout to 5 seconds
)

# Print the list of verified proxies
print(verified_proxies)

# Example Output:
[
  {'proxy': '3.127.121.101:80', 'countryCode': 'DE', 'protocol': 'http', 'anonymityLevel': 'elite'}, 
  {'proxy': '13.36.104.85:80', 'countryCode': 'FR', 'protocol': 'http', 'anonymityLevel': 'elite'},
  ...
  {'proxy': '13.54.47.197:80', 'countryCode': 'AU', 'protocol': 'https', 'anonymityLevel': 'elite'}
]

Contributing

Contributions are welcome! If you have any ideas, suggestions, or improvements, feel free to open an issue or create a pull request on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

free_verify_proxy-2.0.4.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

free_verify_proxy-2.0.4-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file free_verify_proxy-2.0.4.tar.gz.

File metadata

  • Download URL: free_verify_proxy-2.0.4.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for free_verify_proxy-2.0.4.tar.gz
Algorithm Hash digest
SHA256 9919a4abcb160c6196a6cb80b9854e522559bb40ebf5877d4d55f240984bb4a0
MD5 e9f8a247fe899ef5758ba7e15e07f94b
BLAKE2b-256 591d21fbaa495684e46f5bbad1dbe44471840818d52676d3e58d8e05547f0a93

See more details on using hashes here.

File details

Details for the file free_verify_proxy-2.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for free_verify_proxy-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dc00b1d415d6bb884333777f384d8645e5af07a69df2e7ea2325dee96547f826
MD5 eac3b92546748cb1dc7247ea917ad06e
BLAKE2b-256 cf1c7a884568c898d1775605637e9f54bbcabed5735c53b08c939b3afa81d437

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