Skip to content

Commit

Permalink
[erooups] accommodate older albums using different "img src"
Browse files Browse the repository at this point in the history
  • Loading branch information
JSouthGB committed Dec 1, 2023
1 parent f7671e5 commit ae8ba88
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gallery_dl/extractor/erooups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"', "</section>")
extr = text.extr(page, 'class="imgs">', "</section>")
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):
Expand Down

0 comments on commit ae8ba88

Please sign in to comment.