Skip to content

Instantly share code, notes, and snippets.

@avelino
Created March 5, 2018 19:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avelino/f702091cb54893fccd34743775886154 to your computer and use it in GitHub Desktop.
Save avelino/f702091cb54893fccd34743775886154 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import requests
import base64
proxies = {
'http': 'http://avelino:PASS@us-wa.proxymesh.com:31280',
'https': 'http://avelino:PASS@us-wa.proxymesh.com:31280'
}
def main():
url = 'http://ifconfig.me/ip'
response = requests.get(url, proxies=proxies)
print('ip: {}'.format(response.text.strip()))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment