diff options
author | Alexander Sulfrian <alex@spline.inf.fu-berlin.de> | 2017-01-31 17:44:44 +0100 |
---|---|---|
committer | www-data <www-data@vm-staticweb.spline.inf.fu-berlin.de> | 2017-01-31 17:44:44 +0100 |
commit | cbd54ce0e7ee34401b7a45a608d474d87092a4c8 (patch) | |
tree | c3e4ef738f704b09a84db11287d16241a8737190 | |
parent | ada571bd304fc0aabcd2fc2a7ea721aa2f20e8a3 (diff) | |
download | comics-cbd54ce0e7ee34401b7a45a608d474d87092a4c8.tar.gz comics-cbd54ce0e7ee34401b7a45a608d474d87092a4c8.tar.bz2 comics-cbd54ce0e7ee34401b7a45a608d474d87092a4c8.zip |
garfield: Fix HTML parsing
-rwxr-xr-x | bin/comics/garfield | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/comics/garfield b/bin/comics/garfield index 4aaecfe..c73f65e 100755 --- a/bin/comics/garfield +++ b/bin/comics/garfield @@ -16,8 +16,8 @@ newn="${day}.gif" month="$(date -d "$daysago days ago" +%m)" server="http://www.gocomics.com/garfield/$year/$month/$day" -nomen="$(wget ${wget_args} "$server" -O - | grep "class=\"strip\"" | \ - sed 's#.*<img alt="Garfield"[^<]*src="\([^"]*\)".*#\1#')" +nomen="$(wget ${wget_args} "$server" -O - | awk "/picture.*item-comic-image\"/,/<\/picture>/" | \ + sed -n 's/.*src="\(.*\)".*/\1/p')" echo "Dateiname: $nomen" echo |