1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

[patreon] use '"browser": "firefox"' by default (#1117)

This commit is contained in:
Mike Fährmann 2021-02-27 16:26:42 +01:00
parent 61fbbd2dae
commit 29ea54dc41
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
3 changed files with 5 additions and 2 deletions

View File

@ -392,8 +392,9 @@ extractor.*.browser
-------------------
Type
``string``
Default
``"firefox"`` for ``patreon``, ``null`` everywhere else
Example
* ``"firefox"``
* ``"chrome:macos"``
Description
Try to emulate a real browser (``firefox`` or ``chrome``)

View File

@ -32,6 +32,7 @@ class Extractor():
filename_fmt = "{filename}.{extension}"
archive_fmt = ""
cookiedomain = ""
browser = None
root = ""
test = None
request_interval = 0.0
@ -65,7 +66,7 @@ class Extractor():
self.config = self._config_shared
self.config_accumulate = self._config_shared_accumulate
browser = self.config("browser")
browser = self.config("browser", self.browser)
if browser:
self._emulate_browser(browser)
else:

View File

@ -23,6 +23,7 @@ class PatreonExtractor(Extractor):
directory_fmt = ("{category}", "{creator[full_name]}")
filename_fmt = "{id}_{title}_{num:>02}.{extension}"
archive_fmt = "{id}_{num}"
browser = "firefox"
_warning = True
def items(self):