mirror of
https://github.com/daijro/camoufox.git
synced 2026-08-19 00:00:58 +00:00
Merge pull request #323 from dozed-dev/main
fix: return correct country from geoip database
This commit is contained in:
@@ -259,7 +259,7 @@ def get_geolocation(ip: str) -> Geolocation:
|
||||
|
||||
with geoip2.database.Reader(str(MMDB_FILE)) as reader:
|
||||
resp = reader.city(ip)
|
||||
iso_code = cast(str, resp.registered_country.iso_code).upper()
|
||||
iso_code = cast(str, resp.country.iso_code).upper()
|
||||
location = resp.location
|
||||
|
||||
# Check if any required attributes are missing
|
||||
|
||||
Reference in New Issue
Block a user