Skip to content

Commit

Permalink
fixed the static json request Top toon (#2598)
Browse files Browse the repository at this point in the history
* add toptoon

resolves #101

* Update TopToon.mjs

* Update TopToon.mjs

fixed the static json request

* lint

* fetchRegex

Co-authored-by: 09morbab <30987265+09morbab@users.noreply.github.com>
  • Loading branch information
Robonau and Robonau authored Nov 7, 2020
1 parent 1e360a2 commit 749c2cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/web/mjs/connectors/TopToon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export default class TopToon extends Connector {
}

async _getMangas() {
const request = new Request('https://fastidious.toptoon.com/production/comicTotal/504656797d23c25a58c9e6e4890ffeefb0e930abbb449df40ca641736117818e.json', this.requestOptions);
const req = new Request('https://toptoon.com/hashtag', this.requestOptions);
const api = await this.fetchRegex(req, /jsonFileUrl\s*=\s*'([^']*)';/g);
const request = new Request(api[0], this.requestOptions);
const data = await this.fetchJSON(request);
return data.map(ele => {
return{
Expand Down

0 comments on commit 749c2cc

Please sign in to comment.