mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
[itaku] support videos (#1842)
This commit is contained in:
parent
c8ec2c4e85
commit
9d8e99af80
@ -1480,6 +1480,16 @@ Description
|
|||||||
Download video files.
|
Download video files.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.itaku.videos
|
||||||
|
----------------------
|
||||||
|
Type
|
||||||
|
``bool``
|
||||||
|
Default
|
||||||
|
``true``
|
||||||
|
Description
|
||||||
|
Download video files.
|
||||||
|
|
||||||
|
|
||||||
extractor.kemonoparty.comments
|
extractor.kemonoparty.comments
|
||||||
------------------------------
|
------------------------------
|
||||||
Type
|
Type
|
||||||
|
@ -28,6 +28,7 @@ class ItakuExtractor(Extractor):
|
|||||||
Extractor.__init__(self, match)
|
Extractor.__init__(self, match)
|
||||||
self.api = ItakuAPI(self)
|
self.api = ItakuAPI(self)
|
||||||
self.item = match.group(1)
|
self.item = match.group(1)
|
||||||
|
self.videos = self.config("videos", True)
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
for post in self.posts():
|
for post in self.posts():
|
||||||
@ -39,7 +40,11 @@ class ItakuExtractor(Extractor):
|
|||||||
post["tags"] = [t["name"] for t in post["tags"]]
|
post["tags"] = [t["name"] for t in post["tags"]]
|
||||||
post["sections"] = [s["title"] for s in post["sections"]]
|
post["sections"] = [s["title"] for s in post["sections"]]
|
||||||
|
|
||||||
url = post["image"]
|
if post["video"] and self.videos:
|
||||||
|
url = post["video"]["video"]
|
||||||
|
else:
|
||||||
|
url = post["image"]
|
||||||
|
|
||||||
yield Message.Directory, post
|
yield Message.Directory, post
|
||||||
yield Message.Url, url, text.nameext_from_url(url, post)
|
yield Message.Url, url, text.nameext_from_url(url, post)
|
||||||
|
|
||||||
@ -62,53 +67,60 @@ class ItakuGalleryExtractor(ItakuExtractor):
|
|||||||
class ItakuImageExtractor(ItakuExtractor):
|
class ItakuImageExtractor(ItakuExtractor):
|
||||||
subcategory = "image"
|
subcategory = "image"
|
||||||
pattern = BASE_PATTERN + r"/images/(\d+)"
|
pattern = BASE_PATTERN + r"/images/(\d+)"
|
||||||
test = ("https://itaku.ee/images/100471", {
|
test = (
|
||||||
"pattern": r"https://d1wmr8tlk3viaj\.cloudfront\.net/gallery_imgs"
|
("https://itaku.ee/images/100471", {
|
||||||
r"/220504_oUNIAFT\.png",
|
"pattern": r"https://d1wmr8tlk3viaj\.cloudfront\.net/gallery_imgs"
|
||||||
"count": 1,
|
r"/220504_oUNIAFT\.png",
|
||||||
"keyword": {
|
"count": 1,
|
||||||
"already_pinned": None,
|
"keyword": {
|
||||||
"blacklisted": {
|
"already_pinned": None,
|
||||||
"blacklisted_tags": [],
|
"blacklisted": {
|
||||||
"is_blacklisted": False
|
"blacklisted_tags": [],
|
||||||
|
"is_blacklisted": False
|
||||||
|
},
|
||||||
|
"can_reshare": True,
|
||||||
|
"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,
|
||||||
|
"id": 100471,
|
||||||
|
"image": "https://d1wmr8tlk3viaj.cloudfront.net/gallery_imgs"
|
||||||
|
"/220504_oUNIAFT.png",
|
||||||
|
"image_xl": "https://d1wmr8tlk3viaj.cloudfront.net"
|
||||||
|
"/gallery_imgs/220504_oUNIAFT/xl.jpg",
|
||||||
|
"liked_by_you": False,
|
||||||
|
"maturity_rating": "SFW",
|
||||||
|
"num_comments": 2,
|
||||||
|
"num_likes": 80,
|
||||||
|
"num_reshares": 2,
|
||||||
|
"obj_tags": 136446,
|
||||||
|
"owner": 16775,
|
||||||
|
"owner_avatar": "https://d1wmr8tlk3viaj.cloudfront.net"
|
||||||
|
"/profile_pics/av2022r_vKYVywc/sm.jpg",
|
||||||
|
"owner_displayname": "Piku",
|
||||||
|
"owner_username": "piku",
|
||||||
|
"reshared_by_you": False,
|
||||||
|
"sections": ["Miku"],
|
||||||
|
"tags": list,
|
||||||
|
"tags_character": ["hatsune_miku"],
|
||||||
|
"tags_copyright": ["vocaloid"],
|
||||||
|
"tags_general" : ["twintails", "green_hair", "flag", "gloves",
|
||||||
|
"green_eyes", "female", "racing_miku"],
|
||||||
|
"title": "Racing Miku 2022 Ver.",
|
||||||
|
"too_mature": False,
|
||||||
|
"uncompressed_filesize": "0.62",
|
||||||
|
"video": None,
|
||||||
|
"visibility": "PUBLIC",
|
||||||
},
|
},
|
||||||
"can_reshare": True,
|
}),
|
||||||
"date_added": "2022-05-05T19:21:17.674148Z",
|
# video
|
||||||
"date_edited": "2022-05-25T14:37:46.220612Z",
|
("https://itaku.ee/images/19465", {
|
||||||
"description": "sketch from drawpile",
|
"pattern": r"https://d1wmr8tlk3viaj\.cloudfront\.net/gallery_vids"
|
||||||
"extension": "png",
|
r"/sleepy_af_OY5GHWw\.mp4",
|
||||||
"filename": "220504_oUNIAFT",
|
}),
|
||||||
"hotness_score": 11507.4691939,
|
)
|
||||||
"id": 100471,
|
|
||||||
"image": "https://d1wmr8tlk3viaj.cloudfront.net/gallery_imgs"
|
|
||||||
"/220504_oUNIAFT.png",
|
|
||||||
"image_xl": "https://d1wmr8tlk3viaj.cloudfront.net/gallery_imgs"
|
|
||||||
"/220504_oUNIAFT/xl.jpg",
|
|
||||||
"liked_by_you": False,
|
|
||||||
"maturity_rating": "SFW",
|
|
||||||
"num_comments": 2,
|
|
||||||
"num_likes": 80,
|
|
||||||
"num_reshares": 2,
|
|
||||||
"obj_tags": 136446,
|
|
||||||
"owner": 16775,
|
|
||||||
"owner_avatar": "https://d1wmr8tlk3viaj.cloudfront.net"
|
|
||||||
"/profile_pics/av2022r_vKYVywc/sm.jpg",
|
|
||||||
"owner_displayname": "Piku",
|
|
||||||
"owner_username": "piku",
|
|
||||||
"reshared_by_you": False,
|
|
||||||
"sections": ["Miku"],
|
|
||||||
"tags": list,
|
|
||||||
"tags_character": ["hatsune_miku"],
|
|
||||||
"tags_copyright": ["vocaloid"],
|
|
||||||
"tags_general" : ["twintails", "green_hair", "flag", "gloves",
|
|
||||||
"green_eyes", "female", "racing_miku"],
|
|
||||||
"title": "Racing Miku 2022 Ver.",
|
|
||||||
"too_mature": False,
|
|
||||||
"uncompressed_filesize": "0.62",
|
|
||||||
"video": None,
|
|
||||||
"visibility": "PUBLIC",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
def posts(self):
|
def posts(self):
|
||||||
return (self.api.image(self.item),)
|
return (self.api.image(self.item),)
|
||||||
|
Loading…
Reference in New Issue
Block a user