diff options
author | André Glüpker <git@wgmd.de> | 2021-07-29 10:44:16 +0200 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2021-07-29 10:44:16 +0200 |
commit | 10556bfe0f591b4bcf63128ce90f52a5f1ccd140 (patch) | |
tree | 7fd31192e97330928c779b33877d93a2d302ae13 /rss.py | |
parent | 4b0a75b85d1892e04230de828fe09b90d4f73f09 (diff) | |
download | rss-feeds-10556bfe0f591b4bcf63128ce90f52a5f1ccd140.tar.gz rss-feeds-10556bfe0f591b4bcf63128ce90f52a5f1ccd140.tar.bz2 rss-feeds-10556bfe0f591b4bcf63128ce90f52a5f1ccd140.zip |
Fix RSS Syntax Issues
Diffstat (limited to 'rss.py')
-rwxr-xr-x | rss.py | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -1,6 +1,7 @@ #!/usr/bin/env python3 from datetime import datetime +from typing import List def _format_date(dt): """convert a datetime into an RFC 822 formatted date @@ -21,7 +22,23 @@ def _format_date(dt): "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][dt.month-1], dt.year, dt.hour, dt.minute, dt.second) -def buildRSS(feed_data): +class RSSItem: + title: str + url: str + content: str + date: str + enclosures: List[str] + guid: str + + +class RSSFeed: + title: str + url: str + description: str + content: List[RSSItem] + + +def buildRSS(feed_data: RSSFeed): """ feed_data = { title, url, description, |