Links reported more accurately.
This commit is contained in:
parent
9d503d2196
commit
521b862c1c
@ -1,8 +1,9 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
for l in $3 ; do
|
||||
if [[ "${l}" =~ http://|https://|www\..* ]]; then
|
||||
pageTitle="$(curl -L -s --connect-timeout 5 "$l" | sed -n -e 'H;${x;s!.*<head[^>]*>\(.*\)</head>.*!\1!;T;s!.*<title>\(.*\)</title>.*!\1!p}' | pandoc -t plain | tr '[:space:]' ' ')"
|
||||
text="${l#:}"
|
||||
if [[ "${text}" =~ http://|https://|www\..* ]]; then
|
||||
pageTitle="$(curl -L -s --connect-timeout 5 "$text" | sed -n -e 'H;${x;s!.*<head[^>]*>\(.*\)</head>.*!\1!;T;s!.*<title>\(.*\)</title>.*!\1!p}' | pandoc -t plain | tr '[:space:]' ' ')"
|
||||
if [[ ${#pageTitle} -gt 1 ]]; then
|
||||
msg "$2" "$pageTitle"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user