diff --git a/buster/buster.py b/buster/buster.py index 4e6e532..352466a 100644 --- a/buster/buster.py +++ b/buster/buster.py @@ -65,6 +65,10 @@ def fixLinks(text, parser): for element in d('a'): e = PyQuery(element) href = e.attr('href') + + if href is None: + continue + if not abs_url_regex.search(href): new_href = re.sub(r'rss/index\.html$', 'rss/index.rss', href) new_href = re.sub(r'/index\.html$', '/', new_href)