https://github.com/vladimirkucin634/proxy-session-generator
Python tool to create requests sessions with rotating proxies and retry logic
https://github.com/vladimirkucin634/proxy-session-generator
Last synced: 5 months ago
JSON representation
Python tool to create requests sessions with rotating proxies and retry logic
- Host: GitHub
- URL: https://github.com/vladimirkucin634/proxy-session-generator
- Owner: vladimirkucin634
- License: mit
- Created: 2025-05-01T22:37:13.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-01T22:45:26.000Z (5 months ago)
- Last Synced: 2025-05-01T23:27:18.499Z (5 months ago)
- Language: Python
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Proxy Session Generator
A Python tool that automatically fetches free HTTP/HTTPS proxies, builds resilient `requests.Session` objects, and applies retry logic for robust web scraping or API interaction.
---
## Proxy Source
Proxies are fetched in real-time from [https://free-proxy-list.net/](https://free-proxy-list.net/), a public site that lists free, updated proxy servers in a tabular format.
---
## Features
- **Automatic proxy list parsing** from an HTML table
- **Retry strategy** using `urllib3.util.retry.Retry` and `HTTPAdapter`
- **Handles common request failures**, such as:
- Connection errors
- Read timeouts
- 4xx/5xx HTTP status codes (`400`, `403`, `429`, `500`, etc.)
- **Proxy selection is random** from the latest proxy list
- **Custom headers support** for realistic browser emulation
- **SSL verification** via `certifi`---
## Requirements
Install dependencies:
```bash
pip install -r requirements.txt
```