Created
November 2, 2020 00:00
-
-
Save juanluisrto/d652b96351f4049bc07d6fff36978261 to your computer and use it in GitHub Desktop.
Check wether your rotating ip proxy server is working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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