Skip to content

Commit

Permalink
Fix getting feed title and other metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Aug 5, 2020
1 parent 45cafe1 commit 85e0fd9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rss/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ async def _parse_rss(cls, feed: Feed, resp: aiohttp.ClientResponse
if parsed_data.bozo:
if not isinstance(parsed_data.bozo_exception, feedparser.ThingsNobodyCaresAboutButMe):
raise parsed_data.bozo_exception
feed = Feed(id=feed.id, url=feed.url, title=parsed_data.get("title", feed.url),
subtitle=parsed_data.get("description", ""), link=parsed_data.get("link", ""),
feed_data = parsed_data.get("feed", {})
feed = Feed(id=feed.id, url=feed.url, title=feed_data.get("title", feed.url),
subtitle=feed_data.get("description", ""), link=feed_data.get("link", ""),
subscriptions=feed.subscriptions)
return feed, (cls._parse_rss_entry(feed.id, entry) for entry in parsed_data.entries)

Expand Down

0 comments on commit 85e0fd9

Please sign in to comment.