Created
July 31, 2015 21:30
-
-
Save bruab/bfeaadb3081ff34a67f9 to your computer and use it in GitHub Desktop.
Use Python requests and telize API to get latitude and longitude for IP address
This file contains 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
#!/usr/bin/env python | |
import requests | |
r = requests.get("http://www.telize.com/geoip/46.19.37.108") | |
json_object = r.json() | |
print(json_object['latitude']) | |
print(json_object['longitude']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment