Add includelocation=yes to weather-data query string
The WWO request parameters can accept `includelocation=yes` to include the nearest weather point in the JSON results. This is useful to display the name of the location. source: https://www.worldweatheronline.com/developer/api/docs/local-city-town-weather-api.aspx
This commit is contained in:
parent
f956f4ef94
commit
6b6299738f
1 changed files with 1 additions and 0 deletions
|
|
@ -181,6 +181,7 @@ def proxy(path):
|
||||||
query_string = query_string.replace('sr-lat', 'sr')
|
query_string = query_string.replace('sr-lat', 'sr')
|
||||||
query_string = query_string.replace('lang=None', 'lang=en')
|
query_string = query_string.replace('lang=None', 'lang=en')
|
||||||
query_string += "&extra=localObsTime"
|
query_string += "&extra=localObsTime"
|
||||||
|
query_string += "&includelocation=yes"
|
||||||
content, headers = _load_content_and_headers(path, query_string)
|
content, headers = _load_content_and_headers(path, query_string)
|
||||||
|
|
||||||
if content is None:
|
if content is None:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue