Skip to content

Instantly share code, notes, and snippets.

@juanluisrto
Created November 2, 2020 00:00
Show Gist options
  • Save juanluisrto/d652b96351f4049bc07d6fff36978261 to your computer and use it in GitHub Desktop.
Save juanluisrto/d652b96351f4049bc07d6fff36978261 to your computer and use it in GitHub Desktop.
Check wether your rotating ip proxy server is working
proxy = "IP:PORT"
http_proxy = "http://" + proxy
https_proxy = "https://"+ proxy
ftp_proxy = "ftp://"+ proxy
proxyDict = {
"http" : http_proxy,
"https" : https_proxy,
"ftp" : ftp_proxy
}
ipify = "https://api.ipify.org/?format=json"
for i in range(10):
r = requests.get(ipify, proxies= proxyDict).json()['ip']
print(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment