From 999efec5cc8a8345a305ea858f235541b3289006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 30 Apr 2020 21:16:09 +0200 Subject: [PATCH] [deviantart] limit API wait times to 2**9=512 seconds (#721) --- gallery_dl/extractor/deviantart.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index ca722b89..26310527 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -1006,7 +1006,8 @@ class DeviantartOAuthAPI(): msg = "API responded with {} {}".format( status, response.reason) if status == 429: - self.delay += 1 + if self.delay < 9: + self.delay += 1 self.log.warning("%s. Using %ds delay.", msg, 2 ** self.delay) else: self.log.error(msg)