diff --git a/gallery_dl/extractor/patreon.py b/gallery_dl/extractor/patreon.py index 0b64ea3b..3eacf1a8 100644 --- a/gallery_dl/extractor/patreon.py +++ b/gallery_dl/extractor/patreon.py @@ -26,12 +26,15 @@ class PatreonExtractor(Extractor): _warning = True def _init(self): - self.session.headers["User-Agent"] = \ - "Patreon/72.2.28 (Android; Android 14; Scale/2.10)" - if self._warning: - if not self.cookies_check(("session_id",)): + if self.cookies_check(("session_id",)): + self.session.headers["User-Agent"] = \ + "Patreon/72.2.28 (Android; Android 14; Scale/2.10)" + else: + if self._warning: + PatreonExtractor._warning = False self.log.warning("no 'session_id' cookie set") - PatreonExtractor._warning = False + self.session.headers["User-Agent"] = \ + "Patreon/7.6.28 (Android; Android 11; Scale/2.10)" def items(self): generators = self._build_file_generators(self.config("files"))