Move location URL to params
This commit is contained in:
parent
2ed8a53f3d
commit
b6a0cb9e6f
1 changed files with 2 additions and 1 deletions
|
@ -35,10 +35,11 @@ DEFAULT_SRC = "auto"
|
|||
DEFAULT_SRC_FALLBACK = "GBP"
|
||||
|
||||
API_URL = "https://markets.ft.com/data/currencies/ajax/conversion?baseCurrency={}&comparison={}"
|
||||
LOCATION_URL = "https://ipvigilante.com/"
|
||||
|
||||
|
||||
def get_local_country():
|
||||
r = requests.get('https://ipvigilante.com/')
|
||||
r = requests.get(LOCATION_URL)
|
||||
location = r.json()
|
||||
return location['data']['country_name']
|
||||
|
||||
|
|
Loading…
Reference in a new issue