Skip to content

Commit

Permalink
Revert "Update AsuraScans.mjs (#6078)" (#6090)
Browse files Browse the repository at this point in the history
This reverts commit 97d8dcd.
  • Loading branch information
Sheepux committed Jan 2, 2024
1 parent 6977952 commit df40abb
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions src/web/mjs/connectors/AsuraScans.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,13 @@ export default class AsuraScans extends WordPressMangastream {
super.id = 'asurascans';
super.label = 'Asura Scans';
this.tags = ['webtoon', 'english'];
this.config = {
url: {
label: 'URL',
description: 'This website changes between those two URL regularly.\n Please select the one to use',
input: 'select',
options: [
{ value: 'https://www.asurascans.com', name: 'asurascans.com' },
{ value: 'https://asura.gg', name: 'asura.gg' },
],
value: 'https://www.asurascans.com'

}
};
this.url = 'https://www.asurascans.com';
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');
}

get url() {
return this.config.url.value;
}

set url(value) {
if (this.config && value) {
this.config.url.value = value;
Engine.Settings.save();
}
}

async _getPages(chapter) {
const excludes = [
/panda_gif_large/i,
Expand All @@ -46,4 +23,4 @@ export default class AsuraScans extends WordPressMangastream {
const images = await super._getPages(chapter);
return images.filter(link => !excludes.some(rgx => rgx.test(link)));
}
}
}

0 comments on commit df40abb

Please sign in to comment.