diff --git a/gallery_dl/extractor/flickr.py b/gallery_dl/extractor/flickr.py index ea32765497..f7dc3cc2de 100644 --- a/gallery_dl/extractor/flickr.py +++ b/gallery_dl/extractor/flickr.py @@ -386,7 +386,11 @@ def _call(self, method, params): params["nojsoncallback"] = "1" if self.api_key: params["api_key"] = self.api_key - data = self.request(self.API_URL, params=params).json() + response = self.request(self.API_URL, params=params) + try: + data = response.json() + except ValueError: + data = {"code": -1, "message": response.content} if "code" in data: msg = data.get("message") self.log.debug("Server response: %s", data)