From 8b7f5eacbbbf26568f4a62fda65a34f18fd1b065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 25 Apr 2025 16:20:02 +0200 Subject: [PATCH] [subscribestar] add warning for missing login cookie and update expected cookie domains and names --- gallery_dl/extractor/subscribestar.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gallery_dl/extractor/subscribestar.py b/gallery_dl/extractor/subscribestar.py index 5d0ec46e..e9aef9e3 100644 --- a/gallery_dl/extractor/subscribestar.py +++ b/gallery_dl/extractor/subscribestar.py @@ -23,14 +23,15 @@ class SubscribestarExtractor(Extractor): directory_fmt = ("{category}", "{author_name}") filename_fmt = "{post_id}_{id}.{extension}" archive_fmt = "{id}" - cookies_domain = "www.subscribestar.com" - cookies_names = ("auth_token",) + cookies_domain = ".subscribestar.com" + cookies_names = ("_personalization_id",) + _warning = True def __init__(self, match): tld, self.item = match.groups() if tld == "adult": self.root = "https://subscribestar.adult" - self.cookies_domain = "subscribestar.adult" + self.cookies_domain = ".subscribestar.adult" self.subcategory += "-adult" Extractor.__init__(self, match) @@ -80,6 +81,11 @@ class SubscribestarExtractor(Extractor): if username: self.cookies_update(self._login_impl(username, password)) + if self._warning: + if not username or not self.cookies_check(self.cookies_names): + self.log.warning("no '_personalization_id' cookie set") + SubscribestarExtractor._warning = False + @cache(maxage=28*86400, keyarg=1) def _login_impl(self, username, password): self.log.info("Logging in as %s", username)