Looking to implement better geo-location with Python.
Install the Python module pygeoip
C:>pip install pygeoip
Download the binary file of GeoLite City from here: https://dev.maxmind.com/geoip/legacy/geolite/
Then:
>>> import pygeoip
>>> g = pygeoip.GeoIP('GeoLiteCity.dat')
>>> ip = '134.222.199.110' #just an example
>>> g.record_by_addr(ip)['latitude']
52.38239999999999
>>> g.record_by_addr(ip)['longitude']
4.899499999999989
>>> g.record_by_addr(ip)['time_zone']
'Europe/Amsterdam'
Contrary to the freegeoip solution I see in the other comments, this option has no limits on the number of IPs per hour, can be used locally without Internet connection, and the geocoordinates are generally more accurate.