diff options
Diffstat (limited to '')
| -rw-r--r-- | patternutils/commands/prss.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/patternutils/commands/prss.py b/patternutils/commands/prss.py index b2a83fc..fb429a3 100644 --- a/patternutils/commands/prss.py +++ b/patternutils/commands/prss.py @@ -35,12 +35,6 @@ def prss( parsed_feed = feedparser.parse(url) - default_values = { - "feed_title": parsed_feed.feed.title, - "feed_link": parsed_feed.feed.link, - "feed_description": parsed_feed.feed.description, - } - direntries = [] filenames = [] @@ -78,8 +72,10 @@ def prss( "_abspath": os.path.abspath(direntry.path), "_realpath": os.path.realpath(direntry.path), "_relpath": os.path.relpath(direntry.path), + "feed_title": parsed_feed.feed.get("title", None), + "feed_link": parsed_feed.feed.get("link", None), + "feed_description": parsed_feed.feed.get("description", None), } - entry_values.update(default_values) matches.append(entry_values) if stream: |
