replace 'request(…).json()' with 'request_json(…)'

This commit is contained in:
Mike Fährmann
2025-06-29 17:17:09 +02:00
parent 9dbe33b6de
commit f2a72d8d1e
71 changed files with 157 additions and 161 deletions

View File

@@ -293,10 +293,9 @@ class ImgurAPI():
def _call(self, endpoint, params=None, headers=None):
while True:
try:
return self.extractor.request(
return self.extractor.request_json(
"https://api.imgur.com" + endpoint,
params=params, headers=(headers or self.headers),
).json()
params=params, headers=(headers or self.headers))
except exception.HttpError as exc:
if exc.status not in (403, 429) or \
b"capacity" not in exc.response.content: