diff options
| author | 2022-03-15 00:20:05 -0400 | |
|---|---|---|
| committer | 2022-03-15 00:20:05 -0400 | |
| commit | 8167b5c0be04172b11188d5a62b5dfd9c92b484b (patch) | |
| tree | 2e5e86f9aa02937f365de88a7bb6b8a3d0fe845a /gallery_dl/extractor/deviantart.py | |
| parent | 3ad4e25f8d7984bd38128ed406013ca2e32b9ac1 (diff) | |
| parent | c2e774d3f5a4499b8beb5a12ab46a0099b16b1e7 (diff) | |
Update upstream source from tag 'upstream/1.21.0'
Update to upstream version '1.21.0'
with Debian dir b17d3fc3ba4860aceb7f154a3f477cef9bbb23d4
Diffstat (limited to 'gallery_dl/extractor/deviantart.py')
| -rw-r--r-- | gallery_dl/extractor/deviantart.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 94fec16..fda7220 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015-2021 Mike Fährmann +# Copyright 2015-2022 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 @@ -1004,6 +1004,7 @@ class DeviantartOAuthAPI(): self.extractor = extractor self.log = extractor.log self.headers = {"dA-minor-version": "20200519"} + self._warn_429 = True self.delay = extractor.config("wait-min", 0) self.delay_min = max(2, self.delay) @@ -1260,6 +1261,16 @@ class DeviantartOAuthAPI(): if self.delay < 30: self.delay += 1 self.log.warning("%s. Using %ds delay.", msg, self.delay) + + if self._warn_429 and self.delay >= 3: + self._warn_429 = False + if self.client_id == self.CLIENT_ID: + self.log.info( + "Register your own OAuth application and use its " + "credentials to prevent this error: " + "https://github.com/mikf/gallery-dl/blob/master/do" + "cs/configuration.rst#extractordeviantartclient-id" + "--client-secret") else: self.log.error(msg) return data |
