File tree 1 file changed +10
-1
lines changed
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,
73
73
with open (JSON_PATH , 'rb' ) as emails_json_file :
74
74
json_data : dict = json .load (emails_json_file )
75
75
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
+ ))
77
80
78
81
root = tree .getroot ()
79
82
80
83
root .append (ET .Element ("channel" ))
81
84
channel = root [0 ]
82
85
83
86
# Setup RSS metadata specifications
87
+ # atom:link https://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
84
88
channel .extend ([
85
89
ET .Element ("title" ),
86
90
ET .Element ("link" ),
87
91
ET .Element ("description" ),
92
+ ET .Element ("atom:link" , {
93
+ "href" : RSS_CHANNEL_LINK ,
94
+ "ref" : "rel" ,
95
+ "type" : "application/rss+xml"
96
+ }),
88
97
])
89
98
channel [0 ].text = RSS_CHANNEL_TITLE
90
99
channel [1 ].text = RSS_CHANNEL_LINK
You can’t perform that action at this time.
0 commit comments