summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/comics/cyanide4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/comics/cyanide b/bin/comics/cyanide
index dcbff82..51ca365 100755
--- a/bin/comics/cyanide
+++ b/bin/comics/cyanide
@@ -19,14 +19,14 @@ year=`date -d "$daysago days ago 00:00:00" +%Y`
month=`date -d "$daysago days ago 00:00:00" +%m`
day=`date -d "$daysago days ago 00:00:00" +%d`
-part=`curl -s "http://explosm.net/comics/archive/$year/$month" | sed -nre "s#.+/comics/([0-9]+)/?\">$year.$month.$day.+#\1#p"`
+part=`curl -s "http://explosm.net/comics/archive/$year/$month" | sed -nre "/comics\/([0-9]+)/h; /$year.$month.$day/{g;p}" | sed -re 's#.+(comics\/[0-9]+\/).+#\1#'`
if [ -z "$part" ]; then
echo "Cyanide and Happyness: Kein Comic für $year, $month $day"
rm -rf "${tmp}"
exit
fi
-htmladdress="http://explosm.net/comics/$part"
+htmladdress="http://explosm.net/$part"
echo "Cyanide and happyness: $htmladdress gefunden"
browser="Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0"