Skip to content

Commit

Permalink
Fix SirenKomik: fix chapters list + get pictures without JS (#7017)
Browse files Browse the repository at this point in the history
Fixes #6880
  • Loading branch information
MikeZeDev authored May 4, 2024
1 parent 1f4cc6b commit 6a76f76
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/web/mjs/connectors/SirenKomik.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,19 @@ export default class SirenKomik extends WordPressMangastream {
this.tags = ['manga', 'indonesian'];
this.url = 'https://sirenkomik.my.id';
this.path = '/manga/list-mode/';
this.queryChapters = 'div#chaptermanga ul li div.kotak-chapter div.episode a';
this.queryChaptersTitle = 'span.nomer-chapter';
}

async _initializeConnector() {
// for some reasons, fetchui never ends and we reach timeout. I have to put an empty _initializeConnector
}

async _getPages(chapter) {
const url = new URL(chapter.id, this.url);
const request = new Request(url, this.requestOptions);
const [ dom ] = await this.fetchDOM(request, 'body');
const matches = dom.innerHTML.match(/"images"\s*:\s*(\[.*\])\s*}/)[1];
return JSON.parse(matches);
}
}

0 comments on commit 6a76f76

Please sign in to comment.