diff options
Diffstat (limited to 'title.bash')
-rwxr-xr-x | title.bash | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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=$? |