File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -73,18 +73,27 @@ def rss_item(title: str | None = None,
7373with open (JSON_PATH , 'rb' ) as emails_json_file :
7474 json_data : dict = json .load (emails_json_file )
7575
76- tree = ET .ElementTree (ET .Element ("rss" , {"version" : "2.0" }))
76+ tree = ET .ElementTree (ET .Element (
77+ "rss" ,
78+ {"version" : "2.0" , "xmlns:atom" : "http://www.w3.org/2005/Atom" }
79+ ))
7780
7881root = tree .getroot ()
7982
8083root .append (ET .Element ("channel" ))
8184channel = root [0 ]
8285
8386# Setup RSS metadata specifications
87+ # atom:link https://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
8488channel .extend ([
8589 ET .Element ("title" ),
8690 ET .Element ("link" ),
8791 ET .Element ("description" ),
92+ ET .Element ("atom:link" , {
93+ "href" : RSS_CHANNEL_LINK ,
94+ "ref" : "rel" ,
95+ "type" : "application/rss+xml"
96+ }),
8897])
8998channel [0 ].text = RSS_CHANNEL_TITLE
9099channel [1 ].text = RSS_CHANNEL_LINK
You can’t perform that action at this time.
0 commit comments