diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hircine/plugins/scrapers/ehentai_api.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hircine/plugins/scrapers/ehentai_api.py b/src/hircine/plugins/scrapers/ehentai_api.py index d9d539d..d276c5b 100644 --- a/src/hircine/plugins/scrapers/ehentai_api.py +++ b/src/hircine/plugins/scrapers/ehentai_api.py @@ -71,5 +71,7 @@ class EHentaiAPIScraper(Scraper): yield from handler.scrape(response) except json.JSONDecodeError as err: raise ScrapeError("Could not parse JSON response") from err + except (KeyError, IndexError) as err: + raise ScrapeError("Response is missing 'gmetadata' field") from err else: raise ScrapeError(f"Request failed with status code {request.status_code}") |