[patreon] use '"browser": "firefox"' by default (#1117)
This commit is contained in:
@@ -392,8 +392,9 @@ extractor.*.browser
|
|||||||
-------------------
|
-------------------
|
||||||
Type
|
Type
|
||||||
``string``
|
``string``
|
||||||
|
Default
|
||||||
|
``"firefox"`` for ``patreon``, ``null`` everywhere else
|
||||||
Example
|
Example
|
||||||
* ``"firefox"``
|
|
||||||
* ``"chrome:macos"``
|
* ``"chrome:macos"``
|
||||||
Description
|
Description
|
||||||
Try to emulate a real browser (``firefox`` or ``chrome``)
|
Try to emulate a real browser (``firefox`` or ``chrome``)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class Extractor():
|
|||||||
filename_fmt = "{filename}.{extension}"
|
filename_fmt = "{filename}.{extension}"
|
||||||
archive_fmt = ""
|
archive_fmt = ""
|
||||||
cookiedomain = ""
|
cookiedomain = ""
|
||||||
|
browser = None
|
||||||
root = ""
|
root = ""
|
||||||
test = None
|
test = None
|
||||||
request_interval = 0.0
|
request_interval = 0.0
|
||||||
@@ -65,7 +66,7 @@ class Extractor():
|
|||||||
self.config = self._config_shared
|
self.config = self._config_shared
|
||||||
self.config_accumulate = self._config_shared_accumulate
|
self.config_accumulate = self._config_shared_accumulate
|
||||||
|
|
||||||
browser = self.config("browser")
|
browser = self.config("browser", self.browser)
|
||||||
if browser:
|
if browser:
|
||||||
self._emulate_browser(browser)
|
self._emulate_browser(browser)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class PatreonExtractor(Extractor):
|
|||||||
directory_fmt = ("{category}", "{creator[full_name]}")
|
directory_fmt = ("{category}", "{creator[full_name]}")
|
||||||
filename_fmt = "{id}_{title}_{num:>02}.{extension}"
|
filename_fmt = "{id}_{title}_{num:>02}.{extension}"
|
||||||
archive_fmt = "{id}_{num}"
|
archive_fmt = "{id}_{num}"
|
||||||
|
browser = "firefox"
|
||||||
_warning = True
|
_warning = True
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user