diff --git a/src/providers/manga/mangadex.ts b/src/providers/manga/mangadex.ts index f052b477d..45c47b055 100644 --- a/src/providers/manga/mangadex.ts +++ b/src/providers/manga/mangadex.ts @@ -64,7 +64,7 @@ class MangaDex extends MangaParser { for (const id of res.data.chapter.data) { pages.push({ img: `${res.data.baseUrl}/data/${res.data.chapter.hash}/${id}`, - page: parseInt(id.split('-')[0]), + page: parseInt(/x(.*)-/g.exec(id)![1]), }); } return pages; @@ -152,4 +152,11 @@ class MangaDex extends MangaParser { }; } +(async () => { + const mangadex = new MangaDex(); + + const pages = await mangadex.fetchChapterPages('e1bdc8ef-54fa-499f-8553-0aef745e1230'); + console.log(pages); +})(); + export default MangaDex;