mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-21 18:22:30 +01:00
[patreon] use legacy mobile UA when no 'session_id' is set
This commit is contained in:
parent
e3fbd6825b
commit
24408cd450
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user