From cbba67cfc82a36b9498bd889754023a2634765cf Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Mon, 23 Jul 2018 22:18:30 +0200 Subject: Fix cyanide --- bin/comics/cyanide | 4 ++-- 1 file 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" -- cgit v1.2.3-1-g7c22