diff --git a/docs/supportedsites.md b/docs/supportedsites.md index 571f36c2..17cee67d 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -757,12 +757,6 @@ Consider all listed sites to potentially be NSFW. Galleries, individual Images - - Pururin - https://pururin.to/ - Galleries - - Read Comic Online https://readcomiconline.li/ diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 559f6156..98851957 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -134,7 +134,6 @@ modules = [ "pornhub", "pornpics", "postmill", - "pururin", "reactor", "readcomiconline", "reddit", diff --git a/gallery_dl/extractor/pururin.py b/gallery_dl/extractor/pururin.py deleted file mode 100644 index 3a4c614b..00000000 --- a/gallery_dl/extractor/pururin.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright 2019-2023 Mike Fährmann -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. - -"""Extractors for https://pururin.to/""" - -from .common import GalleryExtractor -from .. import text, util - - -class PururinGalleryExtractor(GalleryExtractor): - """Extractor for image galleries on pururin.io""" - category = "pururin" - root = "https://pururin.to" - pattern = r"(?:https?://)?(?:www\.)?pururin\.[ti]o/(?:gallery|read)/(\d+)" - example = "https://pururin.to/gallery/12345/TITLE" - - def __init__(self, match): - self.gallery_id = match.group(1) - url = "{}/gallery/{}/x".format(self.root, self.gallery_id) - GalleryExtractor.__init__(self, match, url) - - def metadata(self, page): - extr = text.extract_from(page) - - def _lst(e=extr): - v = text.unescape(e('value="', '"')) - return [item["name"] for item in util.json_loads(v)] if v else () - - def _str(key, e=extr): - return text.unescape(text.extr( - e(key, ""), 'title="', '"')).partition(" / ")[0] - - title = text.unescape(extr('

', '<')) - title_en, _, title_ja = title.partition(" / ") - - data = { - "gallery_id": text.parse_int(self.gallery_id), - "title" : title_en or title_ja, - "title_en" : title_en, - "title_ja" : title_ja, - "language" : _str("Language"), - "type" : _str("Category"), - "uploader" : text.remove_html(extr("Uploader", "")), - "rating" : text.parse_float(extr( - 'itemprop="ratingValue" content="', '"')), - "artist" : extr('name="artist_tags"', '') or _lst(), - "group" : _lst(), - "parody" : _lst(), - "tags" : _lst(), - "characters": _lst(), - "scanlator" : _lst(), - "convention": _lst(), - "collection": _lst(), - } - data["lang"] = util.language_to_code(data["language"]) - return data - - def images(self, _): - url = "{}/read/{}/01/x".format(self.root, self.gallery_id) - page = self.request(url).text - - svr, pos = text.extract(page, 'data-svr="', '"') - img, pos = text.extract(page, 'data-img="', '"', pos) - data = util.json_loads(text.unescape(img)) - - base = "{}/{}/".format(svr, data["directory"]) - return [(base + i["filename"], None) for i in data["images"]] diff --git a/test/results/pururin.py b/test/results/pururin.py deleted file mode 100644 index 971eb1d3..00000000 --- a/test/results/pururin.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. - -from gallery_dl.extractor import pururin - - -__tests__ = ( -{ - "#url" : "https://pururin.to/gallery/38661/iowant-2", - "#category": ("", "pururin", "gallery"), - "#class" : pururin.PururinGalleryExtractor, - "#pattern" : r"https://i\.pururin\.[ct]o/38661/\d+\.jpg", - - "title" : r"re:I ?owant 2!!", - "title_en" : r"re:I ?owant 2!!", - "title_ja" : "", - "gallery_id": 38661, - "count" : 19, - "artist" : ["Shoda Norihiro"], - "group" : ["Obsidian Order"], - "parody" : ["Kantai Collection"], - "characters": [ - "Iowa", - "Teitoku", - ], - "tags" : list, - "type" : "Doujinshi", - "collection": ["I owant you!"], - "convention": ["C92"], - "rating" : float, - "uploader" : "demo", - "scanlator" : [ - "mrwayne", - "The Lost Light", - ], - "lang" : "en", - "language" : "English", -}, - -{ - "#url" : "https://pururin.to/gallery/7661/unisis-team-vanilla", - "#category": ("", "pururin", "gallery"), - "#class" : pururin.PururinGalleryExtractor, - "#count" : 17, -}, - -{ - "#url" : "https://pururin.io/gallery/38661/iowant-2", - "#category": ("", "pururin", "gallery"), - "#class" : pururin.PururinGalleryExtractor, -}, - -)