# -*- coding: utf-8 -*- # Copyright 2023-2026 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 Chevereto galleries""" from .common import BaseExtractor, Message from .. import text, util class CheveretoExtractor(BaseExtractor): """Base class for chevereto extractors""" basecategory = "chevereto" directory_fmt = ("{category}", "{user}", "{album}") archive_fmt = "{id}" parent = True def _init(self): self.path = self.groups[-1] def _pagination(self, url, callback=None): page = self.request(url).text if len(page) < 45_000 and "assword required" in page and ( form := text.extr(page, "