Fixed stuff
This commit is contained in:
parent
52426bf0ab
commit
d325942185
|
@ -8,7 +8,7 @@
|
|||
<email>baruchel@sdf.org</email>
|
||||
</author>
|
||||
<rights>CC BY-SA 4.0</rights>
|
||||
<updated>2022-11-05T15:32:51</updated>
|
||||
<updated>2022-11-05T14:38:33+00:00Z</updated>
|
||||
<link href="https://git.sdf.org/baruchel/feeds/raw/branch/master/src/blog.rst" />
|
||||
<link href="https://git.sdf.org/baruchel/feeds/raw/branch/master/atom/blog.xml" rel="self" />
|
||||
<generator uri="https://git.sdf.org/baruchel/feeds/src/branch/master/rst2atom.py">rst2atom</generator>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<entry>
|
||||
<title>Initial entry</title>
|
||||
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
|
||||
<updated>2022-11-05T00:00:00</updated>
|
||||
<updated>2022-11-05T00:00:00Z</updated>
|
||||
<content type="xhtml">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml"><div class="section" id="initial-entry">
|
||||
<h1>Initial entry</h1>
|
||||
|
|
|
@ -43,7 +43,7 @@ def extract_meta(html):
|
|||
|
||||
def find_date(d):
|
||||
"""
|
||||
Parse the comments in a <div> section and return a an ISO8601 formatted
|
||||
Parse the comments in a <div> section and return a an RFC 3339 formatted
|
||||
string being the first recognized date string.
|
||||
Raise dateutil.parser.ParserError if no such comment contains a date.
|
||||
|
||||
|
@ -60,7 +60,7 @@ def find_date(d):
|
|||
for k in c.extract().split(" "):
|
||||
try:
|
||||
t = dateutil.parser.parse(k)
|
||||
return t.isoformat(timespec='seconds')
|
||||
return t.isoformat(timespec='seconds') + "Z"
|
||||
except dateutil.parser.ParserError:
|
||||
pass
|
||||
raise dateutil.parser.ParserError
|
||||
|
@ -118,7 +118,7 @@ print("""<?xml version="1.0" encoding="utf-8"?>
|
|||
docinfos["Author:"],
|
||||
docinfos["Contact:"],
|
||||
meta["copyright"],
|
||||
datetime.datetime.now().isoformat(timespec='seconds'),
|
||||
datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='seconds') + "Z",
|
||||
meta["original-source"],
|
||||
meta["syndication-source"],
|
||||
generator_uri, generator_name
|
||||
|
|
Loading…
Reference in New Issue