mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
feat: Update country data management to use AdventureLog CDN for fetching flags and JSON files
This commit is contained in:
parent
5f344cad83
commit
9b54af8d40
3 changed files with 67 additions and 22 deletions
|
@ -31,7 +31,7 @@ def downloadCountriesStateCities():
|
|||
"""
|
||||
res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/{COUNTRY_REGION_JSON_VERSION}/json/countries%2Bstates%2Bcities.json')
|
||||
|
||||
path = os.path.join(os.path.dirname(__file__), 'data', f'countries_states_cities_{COUNTRY_REGION_JSON_VERSION}.json')
|
||||
path = os.path.join(os.path.dirname(__file__), 'data', f'countries_states_cities.json')
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.write(res.text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue