Use curl for links.
This commit is contained in:
parent
306d9aa671
commit
ec8878b6d1
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
for l in $3 ; do
|
for l in $3 ; do
|
||||||
if [[ "${l}" =~ http://|https://|www\..* ]]; then
|
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.
|
# Fix up pageTitle a bit.
|
||||||
pageTitle="${pageTitle//'/\'}"
|
pageTitle="${pageTitle//'/\'}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user