rare crash on rss detection with some websites

This commit is contained in:
Lionel Dricot 2022-02-25 10:59:54 +01:00
parent 3231f425a9
commit edb71471dc
1 changed files with 3 additions and 2 deletions

View File

@ -680,8 +680,9 @@ class HtmlRenderer(AbstractRenderer):
links = soup.find_all("link",rel="alternate",recursive=True)
for l in links:
ty = l.get("type")
if "rss" in ty or "atom" in ty or "feed" in ty:
subs.append([l.get("href"),ty,l.get("title")])
if ty :
if "rss" in ty or "atom" in ty or "feed" in ty:
subs.append([l.get("href"),ty,l.get("title")])
return subs
def get_title(self):