From 167f0bfe438530e555fbcf9894d86ded3ef727af Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 10 Feb 2021 19:33:25 -0300 Subject: Scuttle: fix title fetching --- scuttle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scuttle b/scuttle index 22dd3c9..cb94ae1 100755 --- a/scuttle +++ b/scuttle @@ -49,7 +49,8 @@ CALL="$CALL&tags=$TAGS" # Description if [ -z "$DESC" ]; then - DESC="`torify curl -s $URL | grep -i "" | sed -e 's|<title>\(.*\)|\1|' 2> /dev/null`" + # See http://stackoverflow.com/questions/3195851/ddg#3195895 + DESC="`torify curl -s $URL | grep -i "" | sed -n 's/.*<title>\(.*\)<\/title>.*/\1/ip;T;q' 2> /dev/null`" echo "Fetched description: $DESC" fi -- cgit v1.2.3