Update manager #23
5
rss.py
5
rss.py
|
@ -6,7 +6,10 @@ class FeedItem:
|
|||
self.url = item.get('link', '')
|
||||
self.title = item.get('title', '')
|
||||
self.description = item.get('summary', '')
|
||||
self.date = item.get('published', '')
|
||||
if 'published' in item:
|
||||
self.date = item.published_parsed()
|
||||
else:
|
||||
self.date = ''
|
||||
|
||||
class Feed:
|
||||
def __init__(self, url: str, feed: FeedParserDict) -> None:
|
||||
|
|
|
@ -123,7 +123,8 @@ class Notifier:
|
|||
def __format_message(item: FeedItem) -> str:
|
||||
return (
|
||||
f"<strong><a href=\"{item.url}\">{item.title}</a></strong>\n\n"
|
||||
f"{item.description}"
|
||||
f"{item.description}\n"
|
||||
f"{item.date}"
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue