From 6005986e73e3fd1ef0b761d01ad37891ed4bff6e Mon Sep 17 00:00:00 2001 From: epoch Date: Thu, 6 Aug 2020 15:40:34 -0500 Subject: now download a lot more bytes to look for because the web is shit --- urititle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urititle b/urititle index 7e40fd7..a79670a 100755 --- a/urititle +++ b/urititle @@ -26,8 +26,8 @@ if [ "$port" ];then content_type="redirect probably" fi if [ "${content_type}" = "text/html" -o "${content_type}" = "application/xhtml+xml" ];then -# title="$(printf "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n" "$path" "$domain" "$UA" | ncat -4 $SSL "$domain" "$port" | head -c 10000 | tr -d '\n' | tr '<' '\n' | grep -A 10 '^title>' | grep -B 10 '^\/title>' | cut '-d>' -f2)" - title="$(curl -si "$1" | head -c 10000 | tr -d '\n' | tr '<' '\n' | grep -iA 10 '^title' | grep -iB 10 '^\/title>' | cut '-d>' -f2 | sed 's/^ .//g' | sed 's/ .$//g' | grep .)" +# title="$(printf "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n" "$path" "$domain" "$UA" | ncat -4 $SSL "$domain" "$port" | head -c 10000000 | tr -d '\n' | tr '<' '\n' | grep -A 10 '^title>' | grep -B 10 '^\/title>' | cut '-d>' -f2)" + title="$(curl -si "$1" | head -c 1000000 | tr -d '\n' | tr '<' '\n' | grep -iA 10 '^title' | grep -iB 10 '^\/title>' | cut '-d>' -f2 | sed 's/^ .//g' | sed 's/ .$//g' | grep .)" printf "title: %s\n" "$title" | html_entities_decode else printf "%s\n" "${a_header}" -- cgit v1.2.3