Skip to content

Instantly share code, notes, and snippets.

@gawel
Created October 2, 2016 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gawel/8ecff918ed7421a8b3272a38cca5e84f to your computer and use it in GitHub Desktop.
Save gawel/8ecff918ed7421a8b3272a38cca5e84f to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# pip install "requests[socks]"
import requests
proxies = {
"http": "socks5://localhost:9150",
"https": "socks5://localhost:9150"
}
resp = requests.get(
"https://api.ipify.org?format=json",
proxies=proxies
)
print(resp.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment