[vipergirls] change default 'domain' to 'viper.click' (4166)

https://github.com/mikf/gallery-dl/issues/4166#issuecomment-2684014628

and update general 'domain' handling
This commit is contained in:
Mike Fährmann
2025-02-26 10:41:51 +01:00
parent d2cad599f7
commit 203c2e3492
3 changed files with 13 additions and 3 deletions

View File

@@ -4931,7 +4931,7 @@ extractor.vipergirls.domain
Type Type
``string`` ``string``
Default Default
``"vipergirls.to"`` ``"viper.click"``
Description Description
Specifies the domain used by ``vipergirls`` extractors. Specifies the domain used by ``vipergirls`` extractors.

View File

@@ -674,7 +674,7 @@
"password": "", "password": "",
"sleep-request": "0.5", "sleep-request": "0.5",
"domain" : "vipergirls.to", "domain" : "viper.click",
"like" : false "like" : false
}, },
"vk": "vk":

View File

@@ -29,7 +29,17 @@ class VipergirlsExtractor(Extractor):
def _init(self): def _init(self):
domain = self.config("domain") domain = self.config("domain")
if domain: if domain:
self.root = text.ensure_http_scheme(domain) pos = domain.find("://")
if pos >= 0:
self.root = domain.rstrip("/")
self.cookies_domain = "." + domain[pos+1:].strip("/")
else:
domain = domain.strip("/")
self.root = "https://" + domain
self.cookies_domain = "." + domain
else:
self.root = "https://viper.click"
self.cookies_domain = ".viper.click"
def items(self): def items(self):
self.login() self.login()