mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-21 18:22:30 +01:00
parent
7d0e5877ce
commit
321161c769
@ -627,7 +627,7 @@ Description
|
||||
and use the User-Agent used by the system's default browser.
|
||||
|
||||
Note: This option has no effect on
|
||||
`pixiv`, `e621`, and `mangadex`
|
||||
`pixiv`, `e621`, `mangadex`, and `patreon`
|
||||
extractors, as these need specific values to function correctly.
|
||||
|
||||
|
||||
@ -636,7 +636,7 @@ extractor.*.browser
|
||||
Type
|
||||
``string``
|
||||
Default
|
||||
* ``"firefox"``: ``artstation``, ``mangasee``, ``patreon``, ``pixiv:series``, ``twitter``
|
||||
* ``"firefox"``: ``artstation``, ``mangasee``, ``twitter``
|
||||
* ``null``: otherwise
|
||||
Example
|
||||
* ``"chrome:macos"``
|
||||
@ -712,7 +712,7 @@ extractor.*.tls12
|
||||
Type
|
||||
``bool``
|
||||
Default
|
||||
* ``false``: ``artstation``, ``patreon``, ``pixiv:series``
|
||||
* ``false``: ``artstation``
|
||||
* ``true``: otherwise
|
||||
Description
|
||||
Allow selecting TLS 1.2 cipher suites.
|
||||
|
@ -23,16 +23,17 @@ class PatreonExtractor(Extractor):
|
||||
directory_fmt = ("{category}", "{creator[full_name]}")
|
||||
filename_fmt = "{id}_{title}_{num:>02}.{extension}"
|
||||
archive_fmt = "{id}_{num}"
|
||||
browser = "firefox"
|
||||
tls12 = False
|
||||
_warning = True
|
||||
|
||||
def items(self):
|
||||
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",)):
|
||||
self.log.warning("no 'session_id' cookie set")
|
||||
PatreonExtractor._warning = False
|
||||
|
||||
def items(self):
|
||||
generators = self._build_file_generators(self.config("files"))
|
||||
|
||||
for post in self.posts():
|
||||
|
Loading…
Reference in New Issue
Block a user