mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 20:22:36 +01:00
[lolisafe] implement 'domain' option (#2575)
This commit is contained in:
parent
f3408a9d92
commit
6b6eb0b8f6
@ -877,6 +877,21 @@ Description
|
||||
Download embedded videos hosted on https://www.blogger.com/
|
||||
|
||||
|
||||
extractor.cyberdrop.domain
|
||||
--------------------------
|
||||
Type
|
||||
``string``
|
||||
Default
|
||||
``"auto"``
|
||||
Example
|
||||
``"cyberdrop.to"``
|
||||
Description
|
||||
Specifies the domain used by ``cyberdrop`` regardless of input URL.
|
||||
|
||||
Setting this option to ``"auto"``
|
||||
uses the same domain as a given input URL.
|
||||
|
||||
|
||||
extractor.danbooru.external
|
||||
---------------------------
|
||||
Type
|
||||
@ -1531,6 +1546,20 @@ Description
|
||||
the first in the list gets chosen (usually `mp3`).
|
||||
|
||||
|
||||
extractor.lolisafe.domain
|
||||
-------------------------
|
||||
Type
|
||||
``string``
|
||||
Default
|
||||
``"auto"``
|
||||
Description
|
||||
Specifies the domain used by a ``lolisafe`` extractor
|
||||
regardless of input URL.
|
||||
|
||||
Setting this option to ``"auto"``
|
||||
uses the same domain as a given input URL.
|
||||
|
||||
|
||||
extractor.luscious.gif
|
||||
----------------------
|
||||
Type
|
||||
|
@ -50,6 +50,10 @@
|
||||
{
|
||||
"videos": true
|
||||
},
|
||||
"cyberdrop":
|
||||
{
|
||||
"domain": "auto"
|
||||
},
|
||||
"danbooru":
|
||||
{
|
||||
"username": null,
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user