From af18bea2f6505bd517a009ceb6a5985e7f3aa574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=92=E7=A0=82=E7=B3=96?= <90336521+lings03@users.noreply.github.com> Date: Mon, 26 May 2025 22:20:19 +0800 Subject: [PATCH] [copy_manga] Update header and limit (#71) * [copy_manga] Update header * [copy_manga] Update version --- copy_manga.js | 20 +++++++++++--------- index.json | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/copy_manga.js b/copy_manga.js index e1946f7..5431faf 100644 --- a/copy_manga.js +++ b/copy_manga.js @@ -4,7 +4,7 @@ class CopyManga extends ComicSource { key = "copy_manga" - version = "1.1.5" + version = "1.1.6" minAppVersion = "1.2.1" @@ -12,7 +12,7 @@ class CopyManga extends ComicSource { headers = {} - static copyVersion = "2.2.9" + static copyVersion = "2.3.0" get apiUrl() { return `https://${this.loadSetting('base_url')}` @@ -34,7 +34,8 @@ class CopyManga extends ComicSource { "region": "1", "version": CopyManga.copyVersion, "authorization": `Token${token}`, - "platform": "3", + "platform": "1", + "umstring": "b4c89ca4104ea9a97750314d791520ac", } // 用于储存 { 作者名 : 英文参数 } this.author_path_word_dict = {} @@ -68,7 +69,8 @@ class CopyManga extends ComicSource { "region": "1", "version": CopyManga.copyVersion, "authorization": `Token ${token}`, - "platform": "3", + "platform": "1", + "umstring": "b4c89ca4104ea9a97750314d791520ac", } return "ok" } else { @@ -225,7 +227,7 @@ class CopyManga extends ComicSource { let category_url; // 分类-排行 if (category === "排行" || param === "ranking") { - category_url = `${this.apiUrl}/api/v3/ranks?limit=21&offset=${(page - 1) * 21}&_update=true&type=1&audience_type=${options[0]}&date_type=${options[1]}` + category_url = `${this.apiUrl}/api/v3/ranks?limit=30&offset=${(page - 1) * 30}&_update=true&type=1&audience_type=${options[0]}&date_type=${options[1]}` } else { // 分类-主题 if (category !== undefined && category !== null) { @@ -233,7 +235,7 @@ class CopyManga extends ComicSource { param = CopyManga.category_param_dict[category] || ""; } options = options.map(e => e.replace("*", "-")) - category_url = `${this.apiUrl}/api/v3/comics?limit=21&offset=${(page - 1) * 21}&ordering=${options[1]}&theme=${param}&top=${options[0]}&platform=3` + category_url = `${this.apiUrl}/api/v3/comics?limit=30&offset=${(page - 1) * 30}&ordering=${options[1]}&theme=${param}&top=${options[0]}&platform=3` } @@ -356,7 +358,7 @@ class CopyManga extends ComicSource { if (author && author in this.author_path_word_dict) { let path_word = encodeURIComponent(this.author_path_word_dict[author]); res = await Network.get( - `${this.apiUrl}/api/v3/comics?limit=21&offset=${(page - 1) * 21}&ordering=-datetime_updated&author=${path_word}&platform=3`, + `${this.apiUrl}/api/v3/comics?limit=30&offset=${(page - 1) * 30}&ordering=-datetime_updated&author=${path_word}&platform=3`, this.headers ) } @@ -369,7 +371,7 @@ class CopyManga extends ComicSource { keyword = encodeURIComponent(keyword) let search_url = this.loadSetting('search_api') === "webAPI" ? `${this.apiUrl}/api/kb/web/searchbd/comics` : `${this.apiUrl}/api/v3/search/comic` res = await Network.get( - `${search_url}?limit=21&offset=${(page - 1) * 21}&q=${keyword}&q_type=${q_type}&platform=3`, + `${search_url}?limit=30&offset=${(page - 1) * 30}&q=${keyword}&q_type=${q_type}&platform=1`, this.headers ) } @@ -453,7 +455,7 @@ class CopyManga extends ComicSource { }, loadComics: async (page, folder) => { var res = await Network.get( - `${this.apiUrl}/api/v3/member/collect/comics?limit=21&offset=${(page - 1) * 21}&free_type=1&ordering=-datetime_updated&platform=3`, + `${this.apiUrl}/api/v3/member/collect/comics?limit=30&offset=${(page - 1) * 30}&free_type=1&ordering=-datetime_updated&platform=3`, this.headers ) diff --git a/index.json b/index.json index cf9110b..e890ed8 100644 --- a/index.json +++ b/index.json @@ -3,7 +3,7 @@ "name": "拷贝漫画", "fileName": "copy_manga.js", "key": "copy_manga", - "version": "1.1.5" + "version": "1.1.6" }, { "name": "Komiic",