Skip to content

Instantly share code, notes, and snippets.

@wilkice
Created November 12, 2021 09:06
Show Gist options
  • Select an option

  • Save wilkice/fb3e904b3fc6d6ebb1574abff91439ce to your computer and use it in GitHub Desktop.

Select an option

Save wilkice/fb3e904b3fc6d6ebb1574abff91439ce to your computer and use it in GitHub Desktop.
[requsts proxy] use proxy to do requests #py
import requests
import json
url = 'https://httpbin.org/get'
proxies = {
'http': 'http://127.0.0.1:7890',
'https': 'http://127.0.0.1:7890',
}
r = requests.get(url, proxies=proxies)
print(json.dumps(r.json(), indent=4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment