commit da5a0e686d2ba8e76baea06d705b581148a77393 parent 2054111778daca84ac330179d57ddd22a9c67eba Author: FRIGN <dev@frign.de> Date: Tue, 7 Oct 2014 18:54:10 +0200 Filter HTML-entities in weather Diffstat:
M | weather | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/weather b/weather @@ -6,5 +6,6 @@ tail -n0 -f text_out | while read line; do address=${line:17:${#line}} # strip off date time curl -s --get --data-urlencode "query=$address" \ http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml | \ - perl -ne '/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"' + perl -ne '/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"' | \ + perl -MHTML::Entities -pe 'decode_entities($_);' done > text_in