mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-02-01 03:51:42 +01:00
[pixeldrain] add 'api-key' option (#4839)
This commit is contained in:
parent
e1404827a6
commit
cb9a1176e6
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user