From 37cc66cbae6191a41adfbab0a0c23a573bd48370 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Tue, 27 Jun 2023 17:48:38 +0100 Subject: [PATCH] Use requests.status_codes.codes.TOO_MANY_REQUESTS --- comictalker/talkers/comicvine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comictalker/talkers/comicvine.py b/comictalker/talkers/comicvine.py index 83dfdc9..f5b3a13 100644 --- a/comictalker/talkers/comicvine.py +++ b/comictalker/talkers/comicvine.py @@ -457,7 +457,7 @@ class ComicVineTalker(ComicTalker): time.sleep(1) logger.debug(str(resp.status_code)) tries += 1 - if resp.status_code == 429: + if resp.status_code == requests.status_codes.codes.TOO_MANY_REQUESTS: logger.info(f"{self.name} rate limit encountered. Waiting for 10 seconds\n") time.sleep(10) limit_counter += 1