Changing modules from pandoc to process html to w3m.

This commit is contained in:
Storm Dragon 2020-08-14 22:47:49 -04:00
parent 4d0cee6dca
commit 527ed428ca

View File

@ -1,6 +1,6 @@
[ -f functions.sh ] && source functions.sh
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | pandoc -f html -t plain | tr '[:space:]' ' ' | tr -cd '[:print:]')"
fml="$(curl -Ls --connect-timeout 5 https://fmylife.com/random | grep -m1 -A1 '<a class="article-link" href="/article/.*>' | tail -1 | w3m -dump -T text/html | tr '[:space:]' ' ' | tr -cd '[:print:]')"
if [[ ${#fml} -gt 10 ]]; then
msg "$2" "${fml}"