1
0
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:
Mike Fährmann 2023-11-22 19:13:51 +01:00
parent e1404827a6
commit cb9a1176e6
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 0 deletions

View File

@ -2553,6 +2553,14 @@ Description
Download from video pins. 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 extractor.pixiv.include
----------------------- -----------------------
Type Type

View File

@ -20,6 +20,11 @@ class PixeldrainExtractor(Extractor):
root = "https://pixeldrain.com" root = "https://pixeldrain.com"
archive_fmt = "{id}" 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): def parse_datetime(self, date_string):
return text.parse_datetime( return text.parse_datetime(
date_string, "%Y-%m-%dT%H:%M:%S.%fZ") date_string, "%Y-%m-%dT%H:%M:%S.%fZ")