[pixeldrain] add 'api-key' option (#4839)
This commit is contained in:
@@ -2553,6 +2553,14 @@ Description
|
||||
Download from video pins.
|
||||
|
||||
|
||||
extractor.pixeldrain.api-key
|
||||
----------------------------
|
||||
Type
|
||||
``string``
|
||||
Description
|
||||
Your account's `API key <https://pixeldrain.com/user/api_keys>`__
|
||||
|
||||
|
||||
extractor.pixiv.include
|
||||
-----------------------
|
||||
Type
|
||||
|
||||
@@ -20,6 +20,11 @@ class PixeldrainExtractor(Extractor):
|
||||
root = "https://pixeldrain.com"
|
||||
archive_fmt = "{id}"
|
||||
|
||||
def _init(self):
|
||||
api_key = self.config("api-key")
|
||||
if api_key:
|
||||
self.session.auth = ("", api_key)
|
||||
|
||||
def parse_datetime(self, date_string):
|
||||
return text.parse_datetime(
|
||||
date_string, "%Y-%m-%dT%H:%M:%S.%fZ")
|
||||
|
||||
Reference in New Issue
Block a user