From f956f4ef946d9f9be28c928fc75b2e9eeb8cb073 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 18 Feb 2020 08:44:02 -0800 Subject: [PATCH] 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 --- bin/proxy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/proxy.py b/bin/proxy.py index d38244f..01b8193 100644 --- a/bin/proxy.py +++ b/bin/proxy.py @@ -180,6 +180,7 @@ def proxy(path): query_string = request.query_string query_string = query_string.replace('sr-lat', 'sr') query_string = query_string.replace('lang=None', 'lang=en') + query_string += "&extra=localObsTime" content, headers = _load_content_and_headers(path, query_string) if content is None: