Commit graph

45 commits

Author SHA1 Message Date
Pragmatic Software
6b6299738f 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
2020-02-18 09:09:17 -08:00
Pragmatic Software
f956f4ef94 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
2020-02-18 08:44:02 -08:00
Igor Chubin
918a026422 added code of the geolocation proxy 2020-02-16 19:05:34 +01:00
Igor Chubin
b1ea9be11f minor fixes 2019-12-28 18:08:06 +01:00
Igor Chubin
d78996af54 bin/proxy.py: handle query timeouts 2019-08-28 13:58:36 +02:00
Igor Chubin
3b00e2445b _touch_empty_file (for debug purposes) 2019-08-25 20:39:22 +02:00
Igor Chubin
94047e1e5b wwo url fixed 2019-08-25 20:39:22 +02:00
Igor Chubin
49376a9871 use WTTRIN_SRV_PORT env variable if specified 2019-07-07 20:40:28 +02:00
Igor Chubin
c9ea3315a7
Merge branch 'master' into master 2019-07-07 18:55:15 +02:00
cclauss
7c47cd7d0c Modernize Python 2 code to get ready for Python 3 2018-12-02 09:41:29 +01:00
Igor Chubin
5353cc3a17 bin/proxy.py clean up 2018-10-23 20:04:25 +02:00
Igor Chubin
a25afe4771 moved server related code back to bin/srv.py 2018-10-07 12:11:09 +02:00
Igor Chubin
d7ec9ac840 moved srv.py to lib/ 2018-10-05 16:54:14 +02:00
Igor Chubin
bdfb02ed44 minor cleanup 2018-10-05 16:51:25 +02:00
Igor Chubin
f9e38c367d minor code cleanup 2018-10-03 22:59:11 +02:00
Igor Chubin
0b65985a71 added LISTEN_HOST and LISTEN_PORT 2018-10-03 22:47:02 +02:00
Igor Chubin
ceae32a7da big part of wttr() 2018-10-03 19:50:19 +02:00
Igor Chubin
df5b33c662 show_help() 2018-10-03 19:47:48 +02:00
Igor Chubin
8e1479f6ba User-Agent can be omited 2018-10-03 19:43:53 +02:00
Igor Chubin
ef3cb4dd7c added parse_accept_language() 2018-10-03 19:40:48 +02:00
Igor Chubin
5d7a87afb0 show_help() 2018-10-03 19:39:10 +02:00
Igor Chubin
e120196259 added find_supported_language() 2018-10-03 19:38:33 +02:00
Igor Chubin
3a5335ff0c syncing livecode with github code, step1 2018-10-03 19:37:45 +02:00
Igor Chubin
bcdd09c768 added /malformed-response.html route 2018-10-03 19:11:58 +02:00
Igor Chubin
c7c0430699 request restrictions relaxed 2018-10-03 19:10:26 +02:00
Igor Chubin
c2b3777754 added bin/proxy.py 2018-10-02 23:56:11 +02:00
eric
cfacc1ea5f support for IPv6 hosts 2017-10-19 15:32:06 -04:00
Sebastian Haas
6e5efdeb5e Support DNS LOC record for @<domain> queries
Query LOC record first; use IP address as fallback.
2017-07-27 00:44:51 +02:00
Santiago Basulto
32c1686878 Remove PLAIN_TEXT_AGENTS from globals scope and add python-requests 2017-02-21 20:16:07 -03:00
Igor Chubin
430c56e946 Merge pull request #26 from pkulev/pr-moveout-plain-agents
refactor: move out plain text agents to separate list.
2017-02-04 22:59:08 +01:00
Igor Chubin
cfea6b5f29 Merge pull request #44 from ogarcia/host_port_and_fix
Add host and port configuration and fix unicode decode error
2017-02-04 22:57:18 +01:00
Igor Chubin
6a7b58e54e Merge pull request #40 from kromanenko/code-style
Code style
2017-02-04 22:55:11 +01:00
Artanicus
3ae8d8ddfe Remove debug print I forgot in 2017-02-04 23:20:09 +02:00
Artanicus
2bed3a84c8 wego doesn't have a city flag anymore, it's location now 2017-02-04 23:17:42 +02:00
Óscar García Amor
9e0a9a5d39 Fixed unicode decode error 2016-06-08 17:02:28 +02:00
Kyrylo Romanenko
d8750b4e75 Minor code style fix
Fix indentation and typo.
2016-04-23 00:53:21 +03:00
Kyrylo Romanenko
68637bd71b Remove unused imports 2016-04-23 00:38:14 +03:00
Óscar García Amor
a9f4bf18af Added support to configure listen host and port 2016-03-12 13:45:45 +01:00
Pavel Kulyov
afc8eafd61 refactor: move out plain text agents to separate list. 2016-03-11 11:35:26 +03:00
Christian Garbs
eb2817a20e add 'lwp-request' to non-html user agents
this should make /usr/bin/GET from libwww perl output plain text instead of HTML
2016-02-28 20:59:54 +01:00
Igor Chubin
a5ff1234f2 Merge pull request #3 from aar0nTw/master
Disable html output when use httpie
2016-02-19 19:57:35 +01:00
Sergio Santoro
7bb8d58739 Use environment variables for configuration 2016-02-18 14:44:21 +01:00
Aaron Huang
227fa64211 Disable html output when use httpie 2016-02-18 19:08:17 +08:00
Igor Chubin
757baad76a added favicon.ico 2015-12-27 09:52:50 +02:00
Igor Chubin
05c224c68d checked wttr.in in 2015-12-27 00:22:13 +02:00