From 749c2cc194f9bc700a35d77f5d85b8d29734e9b0 Mon Sep 17 00:00:00 2001 From: robo <30987265+Robonau@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:56:02 +0000 Subject: [PATCH] fixed the static json request Top toon (#2598) * 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> --- src/web/mjs/connectors/TopToon.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web/mjs/connectors/TopToon.mjs b/src/web/mjs/connectors/TopToon.mjs index 769ebf92750..e518a89ed6c 100644 --- a/src/web/mjs/connectors/TopToon.mjs +++ b/src/web/mjs/connectors/TopToon.mjs @@ -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{