mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
[myhentaigallery] recognize '/g/' URLs (#4920)
This commit is contained in:
parent
da76e13e3b
commit
a37b7759bc
@ -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…
Reference in New Issue
Block a user