1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[nhentai] support ',webp' files (#6442)

This commit is contained in:
Mike Fährmann 2024-11-08 17:41:16 +01:00
parent 9e72968154
commit 1ddbcda58b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 14 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class NhentaiGalleryExtractor(GalleryExtractor):
def images(self, _):
ufmt = ("https://i.nhentai.net/galleries/" +
self.data["media_id"] + "/{}.{}")
extdict = {"j": "jpg", "p": "png", "g": "gif"}
extdict = {"j": "jpg", "p": "png", "g": "gif", "w": "webp"}
return [
(ufmt.format(num, extdict.get(img["t"], "jpg")), {

View File

@ -34,6 +34,19 @@ __tests__ = (
"height" : int,
},
{
"#url" : "https://nhentai.net/g/538045/",
"#comment" : "webp (#6442)",
"#class" : nhentai.NhentaiGalleryExtractor,
"#range" : "4-7",
"#urls" : (
"https://i.nhentai.net/galleries/3115523/4.jpg",
"https://i.nhentai.net/galleries/3115523/5.webp",
"https://i.nhentai.net/galleries/3115523/6.webp",
"https://i.nhentai.net/galleries/3115523/7.jpg",
),
},
{
"#url" : "https://nhentai.net/tag/sole-female/",
"#category": ("", "nhentai", "tag"),