mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +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
|
_warning = True
|
||||||
|
|
||||||
def _init(self):
|
def _init(self):
|
||||||
self.session.headers["User-Agent"] = \
|
if self.cookies_check(("session_id",)):
|
||||||
"Patreon/72.2.28 (Android; Android 14; Scale/2.10)"
|
self.session.headers["User-Agent"] = \
|
||||||
if self._warning:
|
"Patreon/72.2.28 (Android; Android 14; Scale/2.10)"
|
||||||
if not self.cookies_check(("session_id",)):
|
else:
|
||||||
|
if self._warning:
|
||||||
|
PatreonExtractor._warning = False
|
||||||
self.log.warning("no 'session_id' cookie set")
|
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):
|
def items(self):
|
||||||
generators = self._build_file_generators(self.config("files"))
|
generators = self._build_file_generators(self.config("files"))
|
||||||
|
Loading…
Reference in New Issue
Block a user