mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-11 22:52:49 +00:00
HDBits provider: handle KeyError (common exception)
This commit is contained in:
parent
91a35317cc
commit
b4195934c1
1 changed files with 6 additions and 1 deletions
|
@ -96,7 +96,12 @@ class HDBitsProvider(Provider):
|
|||
"https://hdbits.org/api/torrents", json={**self._def_params, **lookup}
|
||||
)
|
||||
response.raise_for_status()
|
||||
ids = [item["id"] for item in response.json()["data"]]
|
||||
|
||||
try:
|
||||
ids = [item["id"] for item in response.json()["data"]]
|
||||
except KeyError:
|
||||
logger.debug("No data found")
|
||||
return []
|
||||
|
||||
subtitles = []
|
||||
for torrent_id in ids:
|
||||
|
|
Loading…
Add table
Reference in a new issue