RSS module #19

Merged
Miroslavsckaya merged 8 commits from feature_rss into master 2022-05-29 20:13:40 +00:00
Showing only changes of commit 1dd2ccfc6e - Show all commits

9
rss.py
View file

@ -5,8 +5,7 @@ class FeedItem():
pass
class Feed():
def __init__(self, title: str, url: str, items: list) -> None:
self.title = title
def __init__(self, url: str, items: list) -> None:
self.url = url
self.items = items
@ -18,6 +17,6 @@ class RssReader():
pass
def get_feed(self, url: str) -> Feed:
pass
f = feedparser.parse(url)
items = self.get_items(f.entries)
return Feed(url, items)