[myhentaigallery] recognize '/g/' URLs (#4920)

pull/4945/head
Mike Fährmann 9 months ago
parent da76e13e3b
commit a37b7759bc
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -16,12 +16,12 @@ class MyhentaigalleryGalleryExtractor(GalleryExtractor):
root = "https://myhentaigallery.com"
directory_fmt = ("{category}", "{gallery_id} {artist:?[/] /J, }{title}")
pattern = (r"(?:https?://)?myhentaigallery\.com"
r"/gallery/(?:thumbnails|show)/(\d+)")
example = "https://myhentaigallery.com/gallery/thumbnails/12345"
r"/g(?:allery/(?:thumbnails|show))?/(\d+)")
example = "https://myhentaigallery.com/g/12345"
def __init__(self, match):
self.gallery_id = match.group(1)
url = "{}/gallery/thumbnails/{}".format(self.root, self.gallery_id)
url = "{}/g/{}".format(self.root, self.gallery_id)
GalleryExtractor.__init__(self, match, url)
def _init(self):

@ -9,7 +9,7 @@ from gallery_dl.extractor import myhentaigallery
__tests__ = (
{
"#url" : "https://myhentaigallery.com/gallery/thumbnails/16247",
"#url" : "https://myhentaigallery.com/g/16247",
"#category": ("", "myhentaigallery", "gallery"),
"#class" : myhentaigallery.MyhentaigalleryGalleryExtractor,
"#pattern" : r"https://images\.myhentaicomics\.com/mhg/images/[^/]+/original/\d+\.jpg",
@ -23,6 +23,12 @@ __tests__ = (
"title" : "Attack Of The 50ft Woman 1",
},
{
"#url" : "https://myhentaigallery.com/gallery/thumbnails/16247",
"#category": ("", "myhentaigallery", "gallery"),
"#class" : myhentaigallery.MyhentaigalleryGalleryExtractor,
},
{
"#url" : "https://myhentaigallery.com/gallery/show/16247/1",
"#category": ("", "myhentaigallery", "gallery"),

Loading…
Cancel
Save