27 lines
620 B
Plaintext
27 lines
620 B
Plaintext
# check for explicit feed link
|
|
page_ext=`echo $content | grep -Po "(?<=<link href=').*?(?=' rel='alternate' type='application/rss\+xml'>)" | head -1`
|
|
page_ext=${page_ext##*href=\'}
|
|
|
|
# if explicit feed link not found get user URL and add .rss
|
|
if [[ "$page_ext" == "" ]]
|
|
then
|
|
determine_protocol
|
|
get_domain
|
|
username="${url##*//}"
|
|
username="${username#*/}"
|
|
|
|
if [[ "$username" == @* ]]
|
|
then
|
|
username="${username%%/*}"
|
|
elif [[ "$username" == users/* ]]
|
|
then
|
|
username="${username#*/}"
|
|
username="users/${username%%/*}"
|
|
fi
|
|
|
|
if [[ -n "$username" ]]
|
|
then
|
|
page_ext="${protocol}${domain}/${username}.rss"
|
|
fi
|
|
fi
|