Skip to content

Instantly share code, notes, and snippets.

@mh0w
Created December 18, 2023 13:39
Show Gist options
  • Save mh0w/c8789ff8cf60241c489b054184577428 to your computer and use it in GitHub Desktop.
Save mh0w/c8789ff8cf60241c489b054184577428 to your computer and use it in GitHub Desktop.
Proxy test
import requests
def check_proxy(proxy: str):
proxies = {
"http": f"http://{proxy}",
"https": f"http://{proxy}"
}
try:
requests.get("https://google.com/", proxies=proxies)
print(proxy, "Success")
except:
print(proxy, "Failure")
proxyList = [
"list",
"the",
"proxies",
"here"
]
for x in proxyList:
check_proxy(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment