add feed title to Feed class

This commit is contained in:
mitsuha_s 2022-06-12 20:48:05 +00:00
parent f02b8d85c6
commit e9a311ac67

3
rss.py
View file

@ -12,7 +12,8 @@ class Feed:
def __init__(self, url: str, feed: FeedParserDict) -> None:
self.url = url
self.items = []
for item in feed:
self.title = feed.feed.get('title', '')
for item in feed.entries:
self.items.append(FeedItem(item))
class RssReader: