All Projects → kashaziz → rotating-proxy-python

kashaziz / rotating-proxy-python

Licence: MIT License
Python script for rotation through Proxy Servers

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to rotating-proxy-python

PyStalker
Python script to see you what your friends are doing on Codeforces!
Stars: ✭ 12 (-52%)
Mutual labels:  python-script
mps
MPS is a high-performance HTTP(S) proxy library that supports forward proxies, reverse proxies, man-in-the-middle proxies, tunnel proxies, Websocket proxies. MPS 是一个高性能HTTP(s)中间代理库,它支持正向代理、反向代理、中间人代理、隧道代理、Websocket代理
Stars: ✭ 64 (+156%)
Mutual labels:  proxy-server
FantasyPremierLeague.py
⚽ Statistics for your mini leagues.
Stars: ✭ 123 (+392%)
Mutual labels:  python-script
tgcf
The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
Stars: ✭ 378 (+1412%)
Mutual labels:  python-script
cthulhu
Cthulhu is a simple python CLI application that streams torrents directly from various sources.
Stars: ✭ 26 (+4%)
Mutual labels:  python-script
FullProxy
Bind and reverse connection based, SOCKS5, HTTP and PortForward based portable proxy
Stars: ✭ 22 (-12%)
Mutual labels:  proxy-server
docker-imgproxy
🌐 An ultra fast, production-grade on-the-fly image processing web server. Designed for high throughput with Nginx caching. Powered by imgproxy.
Stars: ✭ 45 (+80%)
Mutual labels:  proxy-server
IpProxyPool
Golang 实现的 IP 代理池, 涉及到的技术点: go gorm proxy proxypool ip crawler 爬虫 mysql viper cobra
Stars: ✭ 36 (+44%)
Mutual labels:  proxy-server
ghstats
Python script to obtain GitHub Release download count and other statistics.
Stars: ✭ 31 (+24%)
Mutual labels:  python-script
pxy
A simple proxy server with flexibility.
Stars: ✭ 31 (+24%)
Mutual labels:  proxy-server
py-problems-solutions
Implementations of various problems using Python. Dynamic Programming, BackTracking & Sorting algorithms 💻
Stars: ✭ 20 (-20%)
Mutual labels:  python-script
go-reverse-proxy
Reverse proxy with simple routing configuration and override behaviour
Stars: ✭ 21 (-16%)
Mutual labels:  proxy-server
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-32%)
Mutual labels:  python-script
IoT
A repository dedicated to IoT(internet of things ) and python scripts
Stars: ✭ 24 (-4%)
Mutual labels:  python-script
userscript-proxy
HTTP proxy to inject scripts and stylesheets into existing sites.
Stars: ✭ 66 (+164%)
Mutual labels:  proxy-server
Spydan
A web spider for shodan.io without using the Developer API.
Stars: ✭ 30 (+20%)
Mutual labels:  python-script
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-8%)
Mutual labels:  python-script
StegoProxy
Steganography proxy implemented in java
Stars: ✭ 19 (-24%)
Mutual labels:  proxy-server
fb-page-chat-download
Python script to download messages from a Facebook page to a CSV file
Stars: ✭ 51 (+104%)
Mutual labels:  python-script
covid-19-bitbar-plugin
Bitbar plugin for covid-19 data.
Stars: ✭ 98 (+292%)
Mutual labels:  python-script

Rotating Proxy Servers in Python

Python class making it easy to Rotate through ProxyMesh Proxy Severs.

Prerequisites

An account with ProxyMesh, either free trial or paid. Set the user name and password in rotatingproxy.py

self.user = ""
self.password = "" 

Usage

Setting the Proxy Server

from rotatingproxy import RotatingProxy

rproxy = RotatingProxy()

The proxy server can either be set randomly or selected from an available list of proxy servers. The active proxy server is saved in a text file which can be accessed as required.

rproxy.set_proxy(israndom="r")  # select a random proxy server

rproxy.set_proxy(proxy_num=1)   # select proxy server with index=1 from the list of proxy servers.

Accessing the Proxy Server

def get_proxy_from_file():
    # fetches proxy from proxy.txt
    with open("proxy.txt", "r") as f:
        return loads(f.read())
        
proxy = get_proxy_from_file()        

The proxy can now be used with requests:

import requests
response = requests.get("url-to-fetch", proxies=proxy)

Running the tests

Unit tests are included to check if the proxy is random or selected from the list of proxy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].