mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-09-27 08:27:24 +00:00
[copy_manga] Update header and limit (#71)
* [copy_manga] Update header * [copy_manga] Update version
This commit is contained in:
@@ -4,7 +4,7 @@ class CopyManga extends ComicSource {
|
|||||||
|
|
||||||
key = "copy_manga"
|
key = "copy_manga"
|
||||||
|
|
||||||
version = "1.1.5"
|
version = "1.1.6"
|
||||||
|
|
||||||
minAppVersion = "1.2.1"
|
minAppVersion = "1.2.1"
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ class CopyManga extends ComicSource {
|
|||||||
|
|
||||||
headers = {}
|
headers = {}
|
||||||
|
|
||||||
static copyVersion = "2.2.9"
|
static copyVersion = "2.3.0"
|
||||||
|
|
||||||
get apiUrl() {
|
get apiUrl() {
|
||||||
return `https://${this.loadSetting('base_url')}`
|
return `https://${this.loadSetting('base_url')}`
|
||||||
@@ -34,7 +34,8 @@ class CopyManga extends ComicSource {
|
|||||||
"region": "1",
|
"region": "1",
|
||||||
"version": CopyManga.copyVersion,
|
"version": CopyManga.copyVersion,
|
||||||
"authorization": `Token${token}`,
|
"authorization": `Token${token}`,
|
||||||
"platform": "3",
|
"platform": "1",
|
||||||
|
"umstring": "b4c89ca4104ea9a97750314d791520ac",
|
||||||
}
|
}
|
||||||
// 用于储存 { 作者名 : 英文参数 }
|
// 用于储存 { 作者名 : 英文参数 }
|
||||||
this.author_path_word_dict = {}
|
this.author_path_word_dict = {}
|
||||||
@@ -68,7 +69,8 @@ class CopyManga extends ComicSource {
|
|||||||
"region": "1",
|
"region": "1",
|
||||||
"version": CopyManga.copyVersion,
|
"version": CopyManga.copyVersion,
|
||||||
"authorization": `Token ${token}`,
|
"authorization": `Token ${token}`,
|
||||||
"platform": "3",
|
"platform": "1",
|
||||||
|
"umstring": "b4c89ca4104ea9a97750314d791520ac",
|
||||||
}
|
}
|
||||||
return "ok"
|
return "ok"
|
||||||
} else {
|
} else {
|
||||||
@@ -225,7 +227,7 @@ class CopyManga extends ComicSource {
|
|||||||
let category_url;
|
let category_url;
|
||||||
// 分类-排行
|
// 分类-排行
|
||||||
if (category === "排行" || param === "ranking") {
|
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 {
|
} else {
|
||||||
// 分类-主题
|
// 分类-主题
|
||||||
if (category !== undefined && category !== null) {
|
if (category !== undefined && category !== null) {
|
||||||
@@ -233,7 +235,7 @@ class CopyManga extends ComicSource {
|
|||||||
param = CopyManga.category_param_dict[category] || "";
|
param = CopyManga.category_param_dict[category] || "";
|
||||||
}
|
}
|
||||||
options = options.map(e => e.replace("*", "-"))
|
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) {
|
if (author && author in this.author_path_word_dict) {
|
||||||
let path_word = encodeURIComponent(this.author_path_word_dict[author]);
|
let path_word = encodeURIComponent(this.author_path_word_dict[author]);
|
||||||
res = await Network.get(
|
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
|
this.headers
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -369,7 +371,7 @@ class CopyManga extends ComicSource {
|
|||||||
keyword = encodeURIComponent(keyword)
|
keyword = encodeURIComponent(keyword)
|
||||||
let search_url = this.loadSetting('search_api') === "webAPI" ? `${this.apiUrl}/api/kb/web/searchbd/comics` : `${this.apiUrl}/api/v3/search/comic`
|
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(
|
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
|
this.headers
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -453,7 +455,7 @@ class CopyManga extends ComicSource {
|
|||||||
},
|
},
|
||||||
loadComics: async (page, folder) => {
|
loadComics: async (page, folder) => {
|
||||||
var res = await Network.get(
|
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
|
this.headers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"name": "拷贝漫画",
|
"name": "拷贝漫画",
|
||||||
"fileName": "copy_manga.js",
|
"fileName": "copy_manga.js",
|
||||||
"key": "copy_manga",
|
"key": "copy_manga",
|
||||||
"version": "1.1.5"
|
"version": "1.1.6"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Komiic",
|
"name": "Komiic",
|
||||||
|
Reference in New Issue
Block a user