Skip to content

Commit

Permalink
FIX YumeKomik : fix getpages (#6215)
Browse files Browse the repository at this point in the history
call standard mangastream method to get images array
  • Loading branch information
MikeZeDev authored Sep 11, 2023
1 parent 582edd2 commit fd9f452
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/web/mjs/connectors/YumeKomik.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,18 @@ export default class YumeKomik extends WordPressMangastream {
};
});
}

async _getPages(chapter) {
const script = `
new Promise((resolve, reject) => {
resolve(ts_reader_control.getImages());
});
`;
const uri = new URL(chapter.id, this.url);
let request = new Request(uri, this.requestOptions);
let data = await Engine.Request.fetchUI(request, script);
// HACK: bypass 'i0.wp.com' image CDN to ensure original images are loaded directly from host
return data.map(link => this.getAbsolutePath(link, request.url).replace(/\/i\d+\.wp\.com/, '')).filter(link => !link.includes('histats.com'));
}

}

0 comments on commit fd9f452

Please sign in to comment.