Skip to content

Commit

Permalink
skip missing descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Jul 20, 2024
1 parent 1fb2130 commit 8c29a84
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ def download(self, feed_url: str) -> list[FeedArticle]:
feed = feedparser.parse(feed_url)
for entry in feed.entries:
pub_date = dateutil.parser.parse(entry.get('published', entry.get('updated', formatdate())))

if 'description' in entry:
description = entry.description
else:
description = None

articles.append(
FeedArticle(
original_title=entry.title,
Expand Down

0 comments on commit 8c29a84

Please sign in to comment.