Skip to content

Commit

Permalink
Update Tempestfansub.mjs (#6084)
Browse files Browse the repository at this point in the history
* Update Tempestfansub.mjs

Domain changed

* Update Tempestfansub.mjs

---------

Co-authored-by: MikeZeDev <[email protected]>
  • Loading branch information
Furkangcmn and MikeZeDev authored Jul 31, 2023
1 parent 5df9f7a commit 08ec9d7
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/web/mjs/connectors/Tempestfansub.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,30 @@ export default class Tempestfansub extends WordPressMangastream {
super.id = 'tempestfansub';
super.label = 'Tempestfansub';
this.tags = [ 'webtoon', 'manga', 'turkish' ];
this.url = 'https://manga.tempestfansub.com';
this.url = 'https://tempestfansub.com';

this.path = '/manga/list-mode/';
}
}

async _getMangas() {
let mangaList = [];
for (let page = 1, run = true; run; page++) {
let mangas = await this._getMangasFromPage(page);
mangas.length > 0 ? mangaList.push(...mangas) : run = false;
}
return mangaList;
}

async _getMangasFromPage(page) {
const uri = new URL('/manga/?page=' + page, this.url);
const request = new Request(uri, this.requestOptions);
let data = await this.fetchDOM(request, 'div.bs div.bsx > a');
return data.map(element => {
return {
id: this.getRootRelativeOrAbsoluteLink(element, request.url),
title: element.title.trim()
};
});
}

}

0 comments on commit 08ec9d7

Please sign in to comment.