[copy_manga] Update header and limit (#71)

* [copy_manga] Update header

* [copy_manga] Update version
This commit is contained in:
角砂糖
2025-05-26 22:20:19 +08:00
committed by GitHub
parent ac38d8809e
commit af18bea2f6
2 changed files with 12 additions and 10 deletions

View File

@@ -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
)

View File

@@ -3,7 +3,7 @@
"name": "拷贝漫画",
"fileName": "copy_manga.js",
"key": "copy_manga",
"version": "1.1.5"
"version": "1.1.6"
},
{
"name": "Komiic",