This script is designed to load proxy URLs from a file, download proxies from those URLs, format them with authentication information, and save them into a new file.
- Load Proxy URLs: Loads a list of proxy URLs from a specified text file (
auth.txt). - Download Proxies: Downloads proxy data from the provided URLs and stores the proxies in a list.
- Reformat Proxies: Reformats each proxy by adding the proxy type (
http://username:password@ip:port). - Save Proxies: Saves the formatted proxies to a text file (
proxies.txt).
- Python 3.x
requestslibrary (can be installed usingpip install requests)
- Load Proxy URLs: The script reads proxy URLs from a text file (default:
auth.txt). Each URL is expected to point to a source where proxies are listed. - Download Proxies: The script then downloads the proxy data from these URLs. Each URL should return a list of proxies in
ip:port:username:passwordformat. - Reformat Proxies: The proxies are reformatted to include the
http://scheme and authentication details in the form ofhttp://username:password@ip:port. - Save Formatted Proxies: The final list of formatted proxies is saved to a new text file (
proxies.txt).
Create a file named auth.txt and add the proxy URLs that return proxy data in ip:port:username:password format:
(https://proxy.webshare.io/api/v2/proxy/list/download/livnfbncznivtuykjfecyrjz/-/any/username/direct/-/)(You can get this while downloading from webshare proxies . There's a URL)
Run the Python script from the command line:
python proxy_downloader.py