diff options
| author | 2025-04-15 05:25:44 -0400 | |
|---|---|---|
| committer | 2025-04-15 05:25:44 -0400 | |
| commit | 71c4f9dc93d81a2733a8ec8fe177e3db0e37d33b (patch) | |
| tree | 284174b9244e04f24ef1fadc5a8ef6980e7b5559 /gallery_dl/extractor/chevereto.py | |
| parent | f13f90dc9ba67ad4a4a2b7a94d175186900b7d38 (diff) | |
| parent | b830dc03b3b7c9dd119648e1be9c1145d56e096c (diff) | |
Update upstream source from tag 'upstream/1.29.4'
Update to upstream version '1.29.4'
with Debian dir a15c4baddb14f9fd81eb2888aeeba8d3406c73f4
Diffstat (limited to 'gallery_dl/extractor/chevereto.py')
| -rw-r--r-- | gallery_dl/extractor/chevereto.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gallery_dl/extractor/chevereto.py b/gallery_dl/extractor/chevereto.py index c9ccb7d..600d231 100644 --- a/gallery_dl/extractor/chevereto.py +++ b/gallery_dl/extractor/chevereto.py @@ -18,19 +18,23 @@ class CheveretoExtractor(BaseExtractor): directory_fmt = ("{category}", "{user}", "{album}",) archive_fmt = "{id}" - def __init__(self, match): - BaseExtractor.__init__(self, match) - self.path = match.group(match.lastindex) + def _init(self): + self.path = self.groups[-1] def _pagination(self, url): - while url: + while True: page = self.request(url).text for item in text.extract_iter( page, '<div class="list-item-image ', 'image-container'): - yield text.extr(item, '<a href="', '"') + yield text.urljoin(self.root, text.extr( + item, '<a href="', '"')) - url = text.extr(page, '<a data-pagination="next" href="', '" ><') + url = text.extr(page, 'data-pagination="next" href="', '"') + if not url: + return + if url[0] == "/": + url = self.root + url BASE_PATTERN = CheveretoExtractor.update({ @@ -42,6 +46,10 @@ BASE_PATTERN = CheveretoExtractor.update({ "root": "https://img.kiwi", "pattern": r"img\.kiwi", }, + "imagepond": { + "root": "https://imagepond.net", + "pattern": r"imagepond\.net", + }, }) |
