[warosu] restore correct 'now' values

This commit is contained in:
Mike Fährmann
2025-06-16 12:00:59 +02:00
parent 489eccb659
commit d9432ee297

View File

@@ -42,6 +42,9 @@ class WarosuThreadExtractor(Extractor):
if "image" in post:
for key in ("w", "h", "no", "time", "tim"):
post[key] = text.parse_int(post[key])
dt = text.parse_timestamp(post["time"])
# avoid zero-padding 'day' with %d
post["now"] = dt.strftime(f"%a, %b {dt.day}, %Y %H:%M:%S")
post.update(data)
yield Message.Url, post["image"], post
@@ -77,7 +80,6 @@ class WarosuThreadExtractor(Extractor):
"no" : extr('id="p', '"'),
"name": extr('class="postername ">', "<").strip(),
"time": extr('class="posttime" title="', '000">'),
"now" : extr("", "<").strip(),
"com" : text.unescape(text.remove_html(extr(
"<blockquote>", "</blockquote>").strip())),
}