diff --git a/docs/supportedsites.md b/docs/supportedsites.md index a15566df98..4ab897af9c 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -181,6 +181,12 @@ Consider all sites to be NSFW unless otherwise known. Albums, Search Results, User Profiles + + Erooups + http://erooups.com/ + Albums, Search Results, User Profiles + + ExHentai https://exhentai.org/ diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 22e4fe3412..b357fdcbc7 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -38,6 +38,7 @@ "dynastyscans", "e621", "erome", + "erooups", "exhentai", "fallenangels", "fanbox", diff --git a/gallery_dl/extractor/erooups.py b/gallery_dl/extractor/erooups.py new file mode 100644 index 0000000000..7a4c47de59 --- /dev/null +++ b/gallery_dl/extractor/erooups.py @@ -0,0 +1,49 @@ +# -*- 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. + +"""Extractors for http://erooups.com/""" + +from .common import GalleryExtractor +from .. import text + + +class ErooupsGalleryExtractor(GalleryExtractor): + category = "erooups" + directory_fmt = ("{category}", "{title}") + archive_fmt = "{date}_{filename}" + pattern = (r"(?:http?://)?(?:www\.)?erooups\.com" + r"/(\d+)/(\d+)/(\d+)/([^/?#]+)") + root = "http://erooups.com" + example = "http://erooups.com/2023/10/25/page-title-11-pics.html" + + def __init__(self, match): + self.year = match.group(1) + self.month = match.group(2) + self.day = match.group(3) + self.slug = match.group(4) + url = "{}/{}/{}/{}/{}".format( + self.root, self.year, self.month, self.day, self.slug) + GalleryExtractor.__init__(self, match, url) + + def images(self, page): + extr = text.extr(page, 'class="imgs">', "") + return [ + (self.root + i if "erooups" not in i else i, None) for i in + text.extract_iter(extr, 'img src="', '"') + ] + + def metadata(self, page): + return { + "pageurl": self.url, + "date": text.parse_datetime( + "{}-{}-{}".format(self.year, self.month, self.day)), + "title": text.extr( + page, '

', "

"), + "tag": text.extr( + page, '">', ""), + "count": text.parse_int(text.extr( + page, '
', "
")), + } diff --git a/scripts/supportedsites.py b/scripts/supportedsites.py index 470b629d6d..4a5ac30194 100755 --- a/scripts/supportedsites.py +++ b/scripts/supportedsites.py @@ -43,6 +43,7 @@ "e926" : "e926", "e6ai" : "e6AI", "erome" : "EroMe", + "erooups" : "erooups", "e-hentai" : "E-Hentai", "exhentai" : "ExHentai", "fallenangels" : "Fallen Angels Scans",