[myhentaigallery] recognize '/g/' URLs (#4920)
This commit is contained in:
@@ -16,12 +16,12 @@ class MyhentaigalleryGalleryExtractor(GalleryExtractor):
|
|||||||
root = "https://myhentaigallery.com"
|
root = "https://myhentaigallery.com"
|
||||||
directory_fmt = ("{category}", "{gallery_id} {artist:?[/] /J, }{title}")
|
directory_fmt = ("{category}", "{gallery_id} {artist:?[/] /J, }{title}")
|
||||||
pattern = (r"(?:https?://)?myhentaigallery\.com"
|
pattern = (r"(?:https?://)?myhentaigallery\.com"
|
||||||
r"/gallery/(?:thumbnails|show)/(\d+)")
|
r"/g(?:allery/(?:thumbnails|show))?/(\d+)")
|
||||||
example = "https://myhentaigallery.com/gallery/thumbnails/12345"
|
example = "https://myhentaigallery.com/g/12345"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
self.gallery_id = match.group(1)
|
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)
|
GalleryExtractor.__init__(self, match, url)
|
||||||
|
|
||||||
def _init(self):
|
def _init(self):
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from gallery_dl.extractor import myhentaigallery
|
|||||||
|
|
||||||
__tests__ = (
|
__tests__ = (
|
||||||
{
|
{
|
||||||
"#url" : "https://myhentaigallery.com/gallery/thumbnails/16247",
|
"#url" : "https://myhentaigallery.com/g/16247",
|
||||||
"#category": ("", "myhentaigallery", "gallery"),
|
"#category": ("", "myhentaigallery", "gallery"),
|
||||||
"#class" : myhentaigallery.MyhentaigalleryGalleryExtractor,
|
"#class" : myhentaigallery.MyhentaigalleryGalleryExtractor,
|
||||||
"#pattern" : r"https://images\.myhentaicomics\.com/mhg/images/[^/]+/original/\d+\.jpg",
|
"#pattern" : r"https://images\.myhentaicomics\.com/mhg/images/[^/]+/original/\d+\.jpg",
|
||||||
@@ -23,6 +23,12 @@ __tests__ = (
|
|||||||
"title" : "Attack Of The 50ft Woman 1",
|
"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",
|
"#url" : "https://myhentaigallery.com/gallery/show/16247/1",
|
||||||
"#category": ("", "myhentaigallery", "gallery"),
|
"#category": ("", "myhentaigallery", "gallery"),
|
||||||
|
|||||||
Reference in New Issue
Block a user