aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/itaku.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/itaku.py')
-rw-r--r--gallery_dl/extractor/itaku.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/gallery_dl/extractor/itaku.py b/gallery_dl/extractor/itaku.py
index dfe4b53..6b2cf4c 100644
--- a/gallery_dl/extractor/itaku.py
+++ b/gallery_dl/extractor/itaku.py
@@ -34,11 +34,19 @@ class ItakuExtractor(Extractor):
for post in self.posts():
post["date"] = text.parse_datetime(
- post["date_added"], "%Y-%m-%dT%H:%M:%S.%f")
+ post["date_added"], "%Y-%m-%dT%H:%M:%S.%fZ")
for category, tags in post.pop("categorized_tags").items():
post["tags_" + category.lower()] = [t["name"] for t in tags]
post["tags"] = [t["name"] for t in post["tags"]]
- post["sections"] = [s["title"] for s in post["sections"]]
+
+ sections = []
+ for s in post["sections"]:
+ group = s["group"]
+ if group:
+ sections.append(group["title"] + "/" + s["title"])
+ else:
+ sections.append(s["title"])
+ post["sections"] = sections
if post["video"] and self.videos:
url = post["video"]["video"]
@@ -79,12 +87,13 @@ class ItakuImageExtractor(ItakuExtractor):
"is_blacklisted": False
},
"can_reshare": True,
+ "date": "dt:2022-05-05 19:21:17",
"date_added": "2022-05-05T19:21:17.674148Z",
"date_edited": "2022-05-25T14:37:46.220612Z",
"description": "sketch from drawpile",
"extension": "png",
"filename": "220504_oUNIAFT",
- "hotness_score": 11507.4691939,
+ "hotness_score": float,
"id": 100471,
"image": "https://d1wmr8tlk3viaj.cloudfront.net/gallery_imgs"
"/220504_oUNIAFT.png",
@@ -102,7 +111,7 @@ class ItakuImageExtractor(ItakuExtractor):
"owner_displayname": "Piku",
"owner_username": "piku",
"reshared_by_you": False,
- "sections": ["Miku"],
+ "sections": ["Fanart/Miku"],
"tags": list,
"tags_character": ["hatsune_miku"],
"tags_copyright": ["vocaloid"],
@@ -152,10 +161,10 @@ class ItakuAPI():
return self._pagination(endpoint, params, self.image)
def image(self, image_id):
- endpoint = "/galleries/images/" + str(image_id)
+ endpoint = "/galleries/images/{}/".format(image_id)
return self._call(endpoint)
- @memcache()
+ @memcache(keyarg=1)
def user(self, username):
return self._call("/user_profiles/{}/".format(username))