From 41af23be7a5fa0056eaa5065ac36092cdc7aee0f Mon Sep 17 00:00:00 2001 From: MikeZeDev Date: Wed, 2 Aug 2023 09:06:18 +0000 Subject: [PATCH] Fix kuaikanmanhua: fix chapter access for some mangas * forced mobile useragent for all requests Fixes https://github.com/manga-download/hakuneko/issues/6097 --- src/web/mjs/connectors/kuaikanmanhua.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/mjs/connectors/kuaikanmanhua.mjs b/src/web/mjs/connectors/kuaikanmanhua.mjs index ca799b08823..b21c225f53a 100644 --- a/src/web/mjs/connectors/kuaikanmanhua.mjs +++ b/src/web/mjs/connectors/kuaikanmanhua.mjs @@ -10,6 +10,7 @@ export default class Kuaikanmanhua extends Connector { this.tags = ['manga', 'chinese']; this.url = 'https://www.kuaikanmanhua.com'; this.list = '/tag/0'; + this.requestOptions.headers.set('x-user-agent', 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'); } async _getMangaFromURI(uri) { @@ -84,7 +85,6 @@ export default class Kuaikanmanhua extends Connector { }); `; const request = new Request(this.url + chapter.id, this.requestOptions); - request.headers.set('x-user-agent', 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'); return await Engine.Request.fetchUI(request, script); } }