Skip to content

Commit

Permalink
Update AsuraScans.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jul 31, 2023
1 parent 87c67db commit d6365ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/web/mjs/connectors/AsuraScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ export default class AsuraScans extends WordPressMangastream {
this.tags = ['webtoon', 'english'];
this.url = 'https://asura.gg';
this.path = '/manga/list-mode/';

this.queryPages = 'div#readerarea p img';
this.requestOptions.headers.set('x-user-agent', 'Mozilla/5.0 (Linux; Android 9; Pixel) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4026.0 Mobile Safari/537.36');
}

canHandleURI(uri) {
return this.url.includes(uri.hostname);
}

async _getPages(chapter) {
const excludes = [
/panda_gif_large/i,
/2021\/04\/page100-10\.jpg/i,
/2021\/03\/20-ending-page-\.jpg/i
/2021\/03\/20-ending-page-\.jpg/i,
/ENDING-PAGE/i
];
const images = await super._getPages(chapter);
return images.filter(link => !excludes.some(rgx => rgx.test(link)));
Expand Down

0 comments on commit d6365ca

Please sign in to comment.