[pixiv] remove redundant cookies initialization

7916c8bf77
75674944f0
This commit is contained in:
Mike Fährmann
2025-08-07 18:34:50 +02:00
parent c7fe6ba691
commit ba174b1a06

View File

@@ -429,14 +429,11 @@ class PixivArtworksExtractor(PixivExtractor):
self.user_id = u1 or u2 self.user_id = u1 or u2
self.tag = t1 or t2 self.tag = t1 or t2
if self.sanity_workaround: if self.sanity_workaround and self._warn_phpsessid:
self.cookies_domain = domain = ".pixiv.net" PixivArtworksExtractor._warn_phpsessid = False
self._init_cookies() if not self.cookies.get("PHPSESSID", domain=self.cookies_domain):
if self._warn_phpsessid: self.log.warning("No 'PHPSESSID' cookie set. Can detect only "
PixivArtworksExtractor._warn_phpsessid = False "non R-18 'limit_sanity_level' works.")
if not self.cookies.get("PHPSESSID", domain=domain):
self.log.warning("No 'PHPSESSID' cookie set. Can detect on"
"ly non R-18 'limit_sanity_level' works.")
def metadata(self): def metadata(self):
if self.config("metadata"): if self.config("metadata"):