repo: uritools
action: commit
revision: 
path_from: 
revision_from: 6005986e73e3fd1ef0b761d01ad37891ed4bff6e:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit 6005986e73e3fd1ef0b761d01ad37891ed4bff6e
Author: epoch 
Date:   Thu Aug 6 15:40:34 2020 -0500

    now download a lot more bytes to look for  because the web is shit

diff --git a/urititle b/urititle
</pre>
<div><a href="https://gemini.nicfab.eu/lxy/external/git.thebackupbox.net%2Furitools%2Fblob%2F%3Fid%3D7e40fd7bc9360dfacbc0f9c8bfad1b5722428f44">index 7e40fd7bc9360dfacbc0f9c8bfad1b5722428f44..</a></div>
<div><a href="https://gemini.nicfab.eu/lxy/external/git.thebackupbox.net%2Furitools%2Fblob%2F%3Fid%3Da79670a08e93340c5bacaf471184e001a10336f2">index ..a79670a08e93340c5bacaf471184e001a10336f2 100755</a></div>
<pre>
--- 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}"
</pre>
<p>-----END OF PAGE-----</p>

</main>
</body>

</html>