use db-ip mmdb
This commit is contained in:
parent
66f9a51769
commit
6b82d7bbf7
1 changed files with 2 additions and 1 deletions
|
@ -397,6 +397,7 @@ def update_geoip(force=False):
|
|||
path = os.path.join(settings.GEOIP_PATH, 'GeoLite2-City.mmdb')
|
||||
if not os.path.exists(path) or force:
|
||||
url = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz'
|
||||
url = 'https://download.db-ip.com/free/dbip-city-lite-2020-01.mmdb.gz'
|
||||
print('download', url)
|
||||
ox.net.save_url(url, "%s.gz" % path)
|
||||
if os.path.exists(path):
|
||||
|
|
Loading…
Reference in a new issue