diff options
| author | 2020-06-16 02:01:18 -0400 | |
|---|---|---|
| committer | 2020-06-16 02:01:18 -0400 | |
| commit | 26ce45757dbc5f5a2bfe342ea45abb3f9e387289 (patch) | |
| tree | 87a4b6c071c354a3af5c275f678a3279f9cb8c70 /gallery_dl/extractor/reddit.py | |
| parent | 0109249eee05a53a0b2153c2531d379ef7f7c251 (diff) | |
| parent | 8c911e3d62a430f5630c13d51b47201fa8ff3cd1 (diff) | |
Update upstream source from tag 'upstream/1.14.1'
Update to upstream version '1.14.1'
with Debian dir e82856fc7804a4243f6f07244b510d9b0489b7f2
Diffstat (limited to 'gallery_dl/extractor/reddit.py')
| -rw-r--r-- | gallery_dl/extractor/reddit.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index 2e3864a..6331b77 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -324,7 +324,11 @@ class RedditAPI(): self.extractor.wait(seconds=response.headers["x-ratelimit-reset"]) return self._call(endpoint, params) - data = response.json() + try: + data = response.json() + except ValueError: + raise exception.StopExtraction(text.remove_html(response.text)) + if "error" in data: if data["error"] == 403: raise exception.AuthorizationError() |
