diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 5e2e1ecc..b0e8da9a 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -400,7 +400,7 @@ Consider all sites to be NSFW unless otherwise known. Imxto https://imx.to/ - individual Images + Galleries, individual Images diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py index d57ec895..66112a94 100644 --- a/gallery_dl/extractor/imagehosts.py +++ b/gallery_dl/extractor/imagehosts.py @@ -135,6 +135,28 @@ class ImxtoImageExtractor(ImagehostImageExtractor): } +class ImxtoGalleryExtractor(ImagehostImageExtractor): + """Extractor for image galleries from imx.to""" + category = "imxto" + subcategory = "gallery" + pattern = r"(?:https?://)?(?:www\.)?(imx\.to/g/([^/?#]+))" + test = ("https://imx.to/g/ozdy", { + "pattern": ImxtoImageExtractor.pattern, + "keyword": {"title": "untitled gallery"}, + "count": 40, + }) + + def items(self): + page = self.request(self.page_url).text + title, pos = text.extract(page, '
")[2]).strip(), + } + for url in text.extract_iter(page, '