Add extra=localObsTime to weather-data fetch query

The `extra` parameter can accept multiple values. The one we're interested in
is `localObsTime`. What it does is:

Adds the current weather observation time in UTC as well as local time of the location requested.

source: https://www.worldweatheronline.com/developer/api/docs/local-city-town-weather-api.aspx
pull/407/head
Pragmatic Software 5 years ago
parent aa15990fc8
commit f956f4ef94

@ -180,6 +180,7 @@ def proxy(path):
query_string = request.query_string query_string = request.query_string
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"
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…
Cancel
Save