projects
/
weather.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add weather zone hkz000 for Hong Kong Observatory
[weather.git]
/
weather.py
diff --git
a/weather.py
b/weather.py
index
78fd79c
..
369ce99
100644
(file)
--- a/
weather.py
+++ b/
weather.py
@@
-238,6
+238,9
@@
def get_uri(
)
sys.stderr.write(message)
sys.exit(1)
+ # Some data sources are HTML with the plain text wrapped in pre tags
+ if "<pre>" in data:
+ data = data[data.find("<pre>")+5:data.find("</pre>")]
if cache_data:
try:
import codecs