[dt] replace 'text.parse_datetime()' & 'text.parse_timestamp()'

This commit is contained in:
Mike Fährmann
2025-10-17 17:43:06 +02:00
parent d57dc48dcd
commit 085616e0a8
138 changed files with 220 additions and 260 deletions

View File

@@ -64,7 +64,7 @@ class MastodonExtractor(BaseExtractor):
status["count"] = len(attachments)
status["tags"] = [tag["name"] for tag in status["tags"]]
status["date"] = text.parse_datetime(
status["date"] = self.parse_datetime(
status["created_at"][:19], "%Y-%m-%dT%H:%M:%S")
yield Message.Directory, status
@@ -319,7 +319,7 @@ class MastodonAPI():
if code == 404:
raise exception.NotFoundError()
if code == 429:
self.extractor.wait(until=text.parse_datetime(
self.extractor.wait(until=self.parse_datetime(
response.headers["x-ratelimit-reset"],
"%Y-%m-%dT%H:%M:%S.%fZ",
))