[lolisafe] implement 'domain' option (#2575)

This commit is contained in:
Mike Fährmann
2022-05-10 12:17:59 +02:00
parent f3408a9d92
commit 6b6eb0b8f6
3 changed files with 39 additions and 0 deletions

View File

@@ -63,6 +63,12 @@ class LolisafeAlbumExtractor(LolisafeExtractor):
LolisafeExtractor.__init__(self, match)
self.album_id = match.group(match.lastindex)
domain = self.config("domain")
if domain is None or domain == "auto":
self.root = text.root_from_url(match.group(0))
else:
self.root = text.ensure_http_scheme(domain)
def items(self):
files, data = self.fetch_album(self.album_id)