This repository has been archived on 2021-11-29. You can view files and clone it, but cannot push or open issues or pull requests.
rsstube-bash-old/scripts/page-extractors/plume

20 lines
471 B
Plaintext

page_ext=`echo "$content" | grep -Po "(?<=<link href=').*?(?=' rel='alternate' type='application/atom\+xml'>)" | head -1`
determine_protocol
get_domain
if [[ ! -n $page_ext ]]
then
# blog page
if [[ "$url" == *${domain}/~/* ]]
then
# get link to user page
user_link=`echo $content | grep -Po '(?<=<a rel="author" class="u-url" href=").*?(?="></a>)' | head -1`
if [[ -n $user_link ]]
then
# get Atom feed
page_ext="${user_link%%/}/atom.xml"
fi
fi
fi