[pixiv] work around strptime limitations in Python < 3.7

"%z" doesn't allow a colon separator in older Python versions:
    - "+0900" is OK
    - "+09:00" raises an exception
This commit is contained in:
Mike Fährmann
2019-05-08 18:00:40 +02:00
parent 1f7fa9dc8e
commit 4736912d4e
2 changed files with 4 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ class PixivExtractor(Extractor):
del work["meta_pages"]
work["num"] = ""
work["tags"] = [tag["name"] for tag in work["tags"]]
work["date"] = text.parse_datetime(work["create_date"])
work["date"] = text.parse_datetime(work["create_date"][:-3] + "00")
work.update(metadata)
yield Message.Directory, work