From aaf58a125933204789a7ae197d6dad474c7c7b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 21 Apr 2023 14:22:26 +0200 Subject: [PATCH] [imgur] document 'client-id' option (#3937) --- docs/configuration.rst | 8 ++++++++ gallery_dl/extractor/imgur.py | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index beac979b..f5652b77 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -1733,6 +1733,14 @@ Description but is most likely going to fail with ``403 Forbidden`` errors. +extractor.imgur.client-id +------------------------- +Type + ``string`` +Description + Custom Client ID value for API requests. + + extractor.imgur.mp4 ------------------- Type diff --git a/gallery_dl/extractor/imgur.py b/gallery_dl/extractor/imgur.py index 42d0a7b1..f8f16006 100644 --- a/gallery_dl/extractor/imgur.py +++ b/gallery_dl/extractor/imgur.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015-2022 Mike Fährmann +# Copyright 2015-2023 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -347,8 +347,8 @@ class ImgurAPI(): def __init__(self, extractor): self.extractor = extractor self.headers = { - "Authorization": "Client-ID " + extractor.config( - "client-id", "546c25a59c58ad7"), + "Authorization": "Client-ID " + ( + extractor.config("client-id") or "546c25a59c58ad7"), } def account_favorites(self, account):