From 96cc170db7141cfb9f3f1ea78c90f6aaaa824c24 Mon Sep 17 00:00:00 2001 From: PipeYume <81861009+PipeYume@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BD=BF=E7=94=A8=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=E7=AB=AFapi=E7=9A=84=E6=90=9C=E7=B4=A2=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=8F=AF=E4=BB=A5=E6=90=9C=E5=88=B0=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E8=A2=AB=E5=B1=8F=E8=94=BD=E7=9A=84=E4=BD=9C=E5=93=81?= =?UTF-8?q?=20(#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 比如葬送的芙莉莲 --- copy_manga.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/copy_manga.js b/copy_manga.js index 41bafc7..15ee780 100644 --- a/copy_manga.js +++ b/copy_manga.js @@ -257,8 +257,9 @@ class CopyManga extends ComicSource { q_type = options[0]; } keyword = encodeURIComponent(keyword) + let search_url = this.loadSetting('search_api') == "webAPI" ? "https://www.copymanga.tv/api/kb/web/searchbc/comics" : "https://api.copymanga.tv/api/v3/search/comic" var res = await Network.get( - `https://api.copymanga.tv/api/v3/search/comic?limit=21&offset=${(page - 1) * 21}&q=${keyword}&q_type=${q_type}&platform=3`, + `${search_url}?limit=21&offset=${(page - 1) * 21}&q=${keyword}&q_type=${q_type}&platform=3`, this.headers ) } @@ -586,4 +587,25 @@ class CopyManga extends ComicSource { throw "未支持此类Tag检索" } } + + settings = { + search_api: { + // title + title: "搜索方式", + // type: input, select, switch + type: "select", + // options + options: [ + { + value: 'baseAPI', + text: '基础API' + }, + { + value: 'webAPI', + text: '网页端API(可搜屏蔽作)' + } + ], + default: 'baseAPI' + } + } }