-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX : AsuraScans domain as a setting (#6142)
* FIX : AsuraScans domain as a setting * Asura change url often, so its now a setting * Had to change AsuraScansTR so it extends Mangastream and not AsuraScans. Because if you want to set URL as a setting in a connector that is extended by another connecor, you end up wiping user settings and bookmarks. * fix lint
- Loading branch information
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
import AsuraScans from './AsuraScans.mjs'; | ||
import WordPressMangastream from './templates/WordPressMangastream.mjs'; | ||
|
||
export default class AsuraScansTR extends AsuraScans { | ||
export default class AsuraScansTR extends WordPressMangastream { | ||
|
||
constructor() { | ||
super(); | ||
super.id = 'asurascans-tr'; | ||
super.label = 'Asura Scans (TR)'; | ||
this.tags = ['webtoon', 'turkish']; | ||
this.url = 'https://asurascanstr.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 icon() { | ||
return '/img/connectors/asurascans'; | ||
} | ||
|
||
async _getPages(chapter) { | ||
const excludes = [ | ||
/panda_gif_large/i, | ||
/2021\/04\/page100-10\.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))); | ||
} | ||
|
||
} |