From ae8ba88925c06cd81fe3405975d29724178a6f0b Mon Sep 17 00:00:00 2001 From: jsouthgb Date: Thu, 30 Nov 2023 22:21:19 -0500 Subject: [PATCH] [erooups] accommodate older albums using different "img src" --- gallery_dl/extractor/erooups.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/erooups.py b/gallery_dl/extractor/erooups.py index 919bdd149a5..7a4c47de597 100644 --- a/gallery_dl/extractor/erooups.py +++ b/gallery_dl/extractor/erooups.py @@ -14,7 +14,6 @@ class ErooupsGalleryExtractor(GalleryExtractor): category = "erooups" directory_fmt = ("{category}", "{title}") archive_fmt = "{date}_{filename}" - subcategory = "gallery" pattern = (r"(?:http?://)?(?:www\.)?erooups\.com" r"/(\d+)/(\d+)/(\d+)/([^/?#]+)") root = "http://erooups.com" @@ -30,11 +29,10 @@ def __init__(self, match): GalleryExtractor.__init__(self, match, url) def images(self, page): - fmt = "http://content.erooups.com/{}".format - extr = text.extr(page, 'class="imgs"', "") + extr = text.extr(page, 'class="imgs">', "") return [ - (fmt(i), None) for i in text.extract_iter( - extr, 'src="http://content.erooups.com', '"') + (self.root + i if "erooups" not in i else i, None) for i in + text.extract_iter(extr, 'img src="', '"') ] def metadata(self, page):