Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Update AsuraScans.mjs (#6078)" #6090

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)));
}
}
}
Loading