little codestyle changes
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
mitsuha_s 2022-05-29 23:11:23 +00:00
parent fa0632e84d
commit d7d7838eb5

9
rss.py
View file

@ -13,6 +13,11 @@ class Feed():
self.items = items
class RssReader():
def get_feed(self, url: str) -> Feed:
f = feedparser.parse(url)
items = self.__get_items(f.entries)
return Feed(url, items)
def __convert_to_feed_item(self, item: dict) -> FeedItem:
if 'title' in item:
title = item['title']
@ -28,7 +33,3 @@ class RssReader():
list_items.append(self.__convert_to_feed_item(item))
return list_items
def get_feed(self, url: str) -> Feed:
f = feedparser.parse(url)
items = self.__get_items(f.entries)
return Feed(url, items)