From 5d64067423a4485bc3af9d00907a8af7d5e08569 Mon Sep 17 00:00:00 2001 From: Proxymiity Date: Mon, 13 Sep 2021 19:42:28 +0200 Subject: [PATCH] =?UTF-8?q?MangaDex=20deprecation:=20Fast=20Edition?= =?UTF-8?q?=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MangaDexPy/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MangaDexPy/__init__.py b/MangaDexPy/__init__.py index f8ead7c..3d782c0 100644 --- a/MangaDexPy/__init__.py +++ b/MangaDexPy/__init__.py @@ -147,14 +147,14 @@ def get_chapters(self, ids: List[str], includes: list = None) -> List[Chapter]: time.sleep(self.rate_limit) if req.status_code == 200: resp = req.json() - chapters += [x for x in resp["results"]] + chapters += [x for x in resp["data"]] elif req.status_code == 204: pass else: raise APIError(req) if not sub or not chapters: raise NoResultsError() - return [Chapter(x["data"], self) for x in chapters] + return [Chapter(x, self) for x in chapters] def get_manga_chapters(self, mg: Manga, params: dict = None, includes: list = None) -> List[Chapter]: """Gets chapters associated with a specific Manga.""" @@ -291,7 +291,7 @@ def _retrieve_pages(self, url: str, obj: Type[Union[Manga, Chapter, Group, Autho req = self.session.get(url, params=p) if req.status_code == 200: resp = req.json() - data += [x for x in resp["results"]] + data += [x for x in resp["data"]] elif req.status_code == 204: pass else: @@ -307,4 +307,4 @@ def _retrieve_pages(self, url: str, obj: Type[Union[Manga, Chapter, Group, Autho time.sleep(self.rate_limit) if not data: raise NoResultsError() - return [obj(x["data"], self) for x in data] + return [obj(x, self) for x in data]