Use curl for links.

This commit is contained in:
Storm Dragon 2020-08-09 21:28:25 -04:00
parent 306d9aa671
commit ec8878b6d1

View File

@ -2,7 +2,7 @@
for l in $3 ; do
if [[ "${l}" =~ http://|https://|www\..* ]]; then
pageTitle="$(wget --quiet -O - "$l" | sed -n -e 'H;${x;s!.*<head[^>]*>\(.*\)</head>.*!\1!;T;s!.*<title>\(.*\)</title>.*!\1!p}')"
pageTitle="$(curl -s --connect-timeout 5 "$l" | sed -n -e 'H;${x;s!.*<head[^>]*>\(.*\)</head>.*!\1!;T;s!.*<title>\(.*\)</title>.*!\1!p}')"
# Fix up pageTitle a bit.
pageTitle="${pageTitle//&#039;/\'}"