diff --git a/feedler/feedparser.py b/feedler/feedparser.py index bc39f98..b4d4f7b 100644 --- a/feedler/feedparser.py +++ b/feedler/feedparser.py @@ -49,12 +49,13 @@ def parse(obj, raw, stream): # Collect tags tags = [] - for tag in obj.raw['tags']: - if 'label' in tag: - label = tag['label'].replace(',','-') - label = label.strip().lower() - if len(label) > 3 and not label in tags: - tags.append(label) - obj.tags = ','.join(tags) + if 'tags' in obj.raw: + for tag in obj.raw['tags']: + if 'label' in tag: + label = tag['label'].replace(',','-') + label = label.strip().lower() + if len(label) > 3 and not label in tags: + tags.append(label) + obj.tags = ','.join(tags) return obj