Skip to content

Instantly share code, notes, and snippets.

@p3nj
Created May 31, 2023 06:21
Show Gist options
  • Save p3nj/56e22da8653d9785738bf75eca836268 to your computer and use it in GitHub Desktop.
Save p3nj/56e22da8653d9785738bf75eca836268 to your computer and use it in GitHub Desktop.
Use geocoder to locate every ip in a list
import geocoder
ip_addrs = ['172.10.10.10']
if __name__ == "__main__":
for i in ip_addrs:
g = geocoder.ip(i)
print(g.country ,g.city, g.latlng)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment