[pixiv] also save untranslated tags when translated-tags is enabled (#1501)

This commit is contained in:
thatfuckingbird 2021-04-23 23:02:41 +02:00 committed by GitHub
parent 9322c5e43b
commit 141ca4ac0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,10 @@ class PixivExtractor(Extractor):
del work["image_urls"] del work["image_urls"]
del work["meta_pages"] del work["meta_pages"]
work["num"] = 0 work["num"] = 0
if self.translated_tags:
work["untranslated_tags"] = [
tag["name"] for tag in work["tags"]
]
work["tags"] = [tag[tkey] or tag["name"] for tag in work["tags"]] work["tags"] = [tag[tkey] or tag["name"] for tag in work["tags"]]
work["date"] = text.parse_datetime(work["create_date"]) work["date"] = text.parse_datetime(work["create_date"])
work["rating"] = ratings.get(work["x_restrict"]) work["rating"] = ratings.get(work["x_restrict"])