Reorder, categorise and clean up. Also now there

is a somewhat usefull readme.
This commit is contained in:
YuruC3
2025-05-09 22:12:19 +02:00
parent 262c297350
commit ef535fa2df
33 changed files with 55 additions and 902 deletions

18
Python/IP2Loc.py Normal file
View File

@@ -0,0 +1,18 @@
import IP2Location
from typing import Optional, Annotated
# Load database once
ip2loc_db = IP2Location.IP2Location("IP2LOCATION-LITE-DB9.BIN")
def ermWhatTheCountry(inpIpAddress: Annotated[str, "Some IP address that ya want to get country for"]):
try:
skibidi = ip2loc_db.get_all(inpIpAddress)
#return rec.country_long # Full country name, e.g. "Sweden"
return skibidi.country_short
except Exception as errrrrr:
return f"Error: {errrrrr}"
#print(ermWhatTheCountry("65.109.142.32"))