From ebb69db21c2fcd8939b5149999a8b03c24db0015 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Thu, 16 Apr 2020 14:49:18 +0100 Subject: Add Twitter to quirks mode since Twitter no longer sends a to even the latest Firefox user agent string --- title.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/title.bash b/title.bash index f695983..5faf3ad 100755 --- a/title.bash +++ b/title.bash @@ -30,6 +30,8 @@ # v1.5 : add a quirks mode, starting with claiming to be cURL for YouTube # v1.5.1: disable Bash globbing # v1.6 : handle multiple title tags, only spoof IP if in quirks mode, add www.ispreview.co.uk to quirks mode +# v1.6.1: change user agent string to latest Firefox +# : add Twitter to quirks mode since Twitter no longer sends a <title> to even the latest Firefox user agent string # Disable globbing set -f @@ -39,7 +41,7 @@ OPTS='--interface 178.32.55.206 --location --insecure --silent --max-filesize 10 read url # Quirks -if echo "$url" | grep -Eq "^http(s|)://(m.|www.|)(youtube\.com|youtu\.be)/|http(s|)://www\.ispreview\.co\.uk/" ; then +if echo "$url" | grep -Eq "^http(s|)://(m.|www.|)(youtube\.com|youtu\.be)/|^http(s|)://www\.ispreview\.co\.uk/|^http(s|)://(www.|)twitter\.com/" ; then OPTS='--interface 192.168.122.10 --location --insecure --silent --max-filesize 1048576 --max-time 10 -H "Accept-Encoding: gzip" -H "Accept: text/html" -H "Accept-Language: en-GB,en;q=0.5"' fi @@ -56,7 +58,7 @@ then echo "Usage: '!title <url>' where <url> is an http:// or https:// URL" elif [ "$url" == "-v" ] || [ "$url" == "--version" ] then - echo "blatitle version 1.6" + echo "blatitle version 1.6.1" else eval curl $OPTS -D /tmp/$TIME.header '$url' -o /tmp/$TIME.body.gz ret=$? -- cgit v1.2.3