Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freegeoip.net is down #11

Open
denics opened this issue Nov 10, 2015 · 0 comments
Open

freegeoip.net is down #11

denics opened this issue Nov 10, 2015 · 0 comments

Comments

@denics
Copy link

denics commented Nov 10, 2015

Hi @Pierrrrrrre ,
very nice script thanks! It is very useful for reports! Unfortunately freegeoip is down now so the script does not work anymore. For this I have just hacked the script to include:

diff --git a/pygeoipmap.py b/pygeoipmap.py
index 2fddb0f..0b1816a 100644
--- a/pygeoipmap.py
+++ b/pygeoipmap.py
@@ -31,9 +31,10 @@ def get_lat_lon(ip_list=[], lats=[], lons=[]):
     """
     print("Processing {} IPs...".format(len(ip_list)))
     for ip in ip_list:
-        r = requests.get("https://freegeoip.net/json/" + ip)
+        #r = requests.get("https://freegeoip.net/json/" + ip)
+        r = requests.get("https://www.telize.com/geoip/" + ip)
         json_response = r.json()
-        print("{ip}, {region_name}, {country_name}, {latitude}, {longitude}".format(**json_response))
+        print("{ip}, {continent_code}, {country}, {latitude}, {longitude}".format(**json_response))
         if json_response['latitude'] and json_response['longitude']:
             lats.append(json_response['latitude'])
             lons.append(json_response['longitude'])

and use telize.com. I did not do a merge request because telize will shut down soon too .
Thanks again,
Denis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant