[xenforo] fix using cookies for custom instances (#8902)

This commit is contained in:
Mike Fährmann
2026-01-19 11:23:00 +01:00
parent 713d59df7d
commit 38160c9292

View File

@@ -24,7 +24,7 @@ class XenforoExtractor(BaseExtractor):
def __init__(self, match): def __init__(self, match):
BaseExtractor.__init__(self, match) BaseExtractor.__init__(self, match)
self.cookies_domain = "." + self.root.split("/")[2] self.cookies_domain = "." + self.root.split("/")[2]
self.cookies_names = self.config_instance("cookies") self.cookies_names = self.config_instance("cookies") or ("xf_user",)
def items(self): def items(self):
self.login() self.login()
@@ -152,7 +152,7 @@ class XenforoExtractor(BaseExtractor):
raise raise
def login(self): def login(self):
if self.cookies_check(self.cookies_names): if self.cookies_names and self.cookies_check(self.cookies_names):
return return
username, password = self._get_auth_info() username, password = self._get_auth_info()
@@ -367,12 +367,10 @@ BASE_PATTERN = XenforoExtractor.update({
"nudostarforum": { "nudostarforum": {
"root": "https://nudostar.com/forum", "root": "https://nudostar.com/forum",
"pattern": r"(?:www\.)?nudostar\.com/forum", "pattern": r"(?:www\.)?nudostar\.com/forum",
"cookies": ("xf_user",),
}, },
"atfforum": { "atfforum": {
"root": "https://allthefallen.moe/forum", "root": "https://allthefallen.moe/forum",
"pattern": r"(?:www\.)?allthefallen\.moe/forum", "pattern": r"(?:www\.)?allthefallen\.moe/forum",
"cookies": ("xf_user",),
}, },
}) })