add feed title to Feed class
This commit is contained in:
parent
f02b8d85c6
commit
e9a311ac67
3
rss.py
3
rss.py
|
@ -12,7 +12,8 @@ class Feed:
|
||||||
def __init__(self, url: str, feed: FeedParserDict) -> None:
|
def __init__(self, url: str, feed: FeedParserDict) -> None:
|
||||||
self.url = url
|
self.url = url
|
||||||
self.items = []
|
self.items = []
|
||||||
for item in feed:
|
self.title = feed.feed.get('title', '')
|
||||||
|
for item in feed.entries:
|
||||||
self.items.append(FeedItem(item))
|
self.items.append(FeedItem(item))
|
||||||
|
|
||||||
class RssReader:
|
class RssReader:
|
||||||
|
|
Loading…
Reference in a new issue