diff options
Diffstat (limited to 'plugins')
-rwxr-xr-x | plugins/mangadex.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/mangadex.py b/plugins/mangadex.py index 16fa838..f39ceb4 100755 --- a/plugins/mangadex.py +++ b/plugins/mangadex.py @@ -89,16 +89,16 @@ def list_chapters(url, chapter_list_input): break json_response = response.json() - results = json_response["results"] - if len(results) == 0: - break - for result_item in results: - if result_item["result"] != "ok": - print("Got item with result != ok") - exit(1) + if json_response["result"] != "ok": + print("Got result != ok") + exit(1) + + data_list = json_response["data"] + if len(data_list) == 0: + break - data = result_item["data"] + for data in data_list: id = data["id"] attributes = data["attributes"] if attributes["translatedLanguage"] != lang: |