A Python script to find, check, and manage HTTP proxies with a command-line interface (CLI).
- Find Proxies: Scrapes proxies from multiple online sources.
- Check Proxies: Verifies the functionality of the proxies.
- Store Proxies: Stores proxies and their status in a SQLite database.
- Manage Proxies: Provides commands to filter, display, and export proxies.
Install the package and its dependencies using pip:
pip install git+https://github.com/CalumRakk/proxyfinderThe script is executed from the command line using the proxyfinder command followed by the action you want to perform and any relevant options.
The general structure of the commands is:
proxyfinder <command> [options]The following command finds new proxies and saves them:
proxyfinder findThe following command checks if the proxies that have not been "verified" are working:
proxyfinder checkAlternatively, you can use the following command, which performs both find and check in a single step:
proxyfinder updateFinally, you can view the working proxies or export them to a file:
proxyfinder show
proxyfinder export proxies.txtproxyfinder find [--concurrency <num>]--concurrency <num>(optional): Number of threads to use for searching. Defaults to 10.
This command searches for new proxies in the configured sources and adds them to the database. It does not verify proxy servers, so you must use the check command.
Example:
proxyfinder findThis command finds new proxies.
proxyfinder check [--status <status>] [--concurrency <num>] [--older-than <days>]--status <status>(optional): Filters the proxies to check based on their status. Possible values:working,broken,unchecked, orall. Defaults tounchecked.--concurrency <num>(optional): Number of threads to use for checking. Defaults to 10.--older-than <days>(optional): Only checks proxies that haven't been checked in the last N days. Defaults to 0 (checks all proxies).
This command verifies the functionality of the proxies in the database and updates their status (working/broken).
Examples:
proxyfinder check --status unchecked
proxyfinder check --older-than 7The first command checks all unchecked proxies. The second command checks proxies that haven't been checked in the last 7 days.
proxyfinder show [--status <status>] [--limit <num>] [--count] [--sort-by <field>] [--reverse] [--older-than <days>]--status <status>(optional): Filters proxies by status. Possible values:working,broken,unchecked, orall. Defaults toworking.--limit <num>(optional): Limits the number of proxies to display.--count(optional): Displays only the number of proxies instead of listing them.--sort-by <field>(optional): Sorts proxies by the specified field. Possible values:latency,created_at,updated_at. Defaults tolatency.--reverse(optional): Reverses the sorting order.--older-than <days>(optional): Shows only proxies that have not been checked in the last specified number of days.
Examples:
proxyfinder show --status working --limit 20 --sort-by latency --reverse
proxyfinder show --status all --countThe first command displays the 20 best working proxies ordered by latency in reverse order. The second command shows the total number of proxies in the database.
proxyfinder export <output_file> [--all]<output_file>(required): The path to the output CSV file.--all(optional): Exports all proxies, not just working ones.
This command exports the selected proxies to a CSV file.
Examples:
proxyfinder export working_proxies.csv
proxyfinder export all_proxies.csv --allThe first command exports only working proxies to working_proxies.csv. The second command exports all proxies to all_proxies.csv.
proxyfinder update [--concurrency <num>]--concurrency <num>(optional): Number of threads to use for searching and checking. Defaults to 10.
This command combines the find and check commands. First, it finds new proxies and then checks their functionality.
Example:
proxyfinder update --concurrency 15This command finds and checks new proxies, using 15 threads for both operations.
- Use
proxyfinder help <command>to get detailed help for a specific command. - Be mindful of the
--concurrencyparameter. Although the thread count is adjusted based on system resources, using too many threads may still lead to overload. - Regularly run
proxyfinder checkto keep your proxy list up-to-date.