Skip to content

Commit a93029f

Browse files
修复
1 parent 014ea2c commit a93029f

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CopyManga Plugin
22

3-
用于阅读[拷贝漫画](https://www.mangacopy.com)的 Rulia 插件.
3+
用于阅读[拷贝漫画](https://www.copy200.com)的 Rulia 插件.
44

55
## 说明
66

index.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
let headers = {
2-
'Platform': 1,
32
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,ja;q=0.5',
43
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0'
54
}
@@ -13,7 +12,7 @@ if (userConfig.authorization) {
1312
}
1413

1514
async function setMangaListFilterOptions() {
16-
const url = 'https://www.copy20.com/api/v3/h5/filter/comic/tags';
15+
const url = 'https://api.copy2000.online/api/v3/h5/filter/comic/tags';
1716
try {
1817
let result = [{
1918
label: '主题',
@@ -68,7 +67,7 @@ async function setMangaListFilterOptions() {
6867

6968
async function getMangaListByRecommend(page, pageSize) {
7069
const url =
71-
'https://www.copy20.com/api/v3/recs';
70+
'https://api.copy2000.online/api/v3/recs';
7271
try {
7372
const rawResponse = await window.Rulia.httpRequest({
7473
url: url,
@@ -97,7 +96,7 @@ async function getMangaListByRecommend(page, pageSize) {
9796

9897
async function getMangaListByBookshelf(page, pageSize) {
9998
const url =
100-
'https://mangacopy.com/api/v3/member/collect/comics';
99+
'https://api.copy2000.online/api/v3/member/collect/comics';
101100
try {
102101
const rawResponse = await window.Rulia.httpRequest({
103102
url: url,
@@ -106,7 +105,9 @@ async function getMangaListByBookshelf(page, pageSize) {
106105
'&free_type=1&ordering=-datetime_modifier',
107106
headers: {
108107
'authorization': authorization,
109-
'Platform': 2
108+
'Platform': 2,
109+
'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,ja;q=0.5',
110+
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0'
110111
}
111112
});
112113
const response = JSON.parse(rawResponse);
@@ -133,7 +134,7 @@ async function getMangaListByCategory(page, pageSize, filterOptions) {
133134
} else if (filterOptions.theme == 'bookshelf') {
134135
return await getMangaListByBookshelf(page, pageSize);
135136
} else {
136-
const url = 'https://www.copy20.com/api/v3/comics';
137+
const url = 'https://api.copy2000.online/api/v3/comics';
137138
try {
138139
let theme = '';
139140
let top = '';
@@ -172,13 +173,13 @@ async function getMangaListByCategory(page, pageSize, filterOptions) {
172173

173174
async function getMangaListBySearching(page, pageSize, keyword) {
174175
const url =
175-
'https://www.copy20.com/api/v3/search/comic';
176+
'https://api.copy2000.online/api/kb/web/searchbd/comics';
176177
try {
177178
const rawResponse = await window.Rulia.httpRequest({
178179
url: url,
179180
method: 'GET',
180-
payload: '_update=true&format=json&limit=' + pageSize + '&offset=' + ((page - 1) * pageSize) +
181-
'&platform=1&q=' + keyword + '&q_type=',
181+
payload: 'limit=' + pageSize + '&offset=' + ((page - 1) * pageSize) +
182+
'&platform=2&q=' + keyword + '&q_type=',
182183
headers: headers
183184
});
184185
const response = JSON.parse(rawResponse);
@@ -210,8 +211,9 @@ async function getMangaList(page, pageSize, keyword, rawFilterOptions) {
210211
async function getMangaData(dataPageUrl) {
211212
const seasonIdMatchExp = /\/comic\/(.*)/;
212213
const seasonIdMatch = dataPageUrl.match(seasonIdMatchExp);
213-
const detailUrl = 'https://www.copy20.com/api/v3/comic2/' + seasonIdMatch[1];
214-
const chapterListUrl = 'https://www.copy20.com/api/v3/comic/' + seasonIdMatch[1] + '/group/default/chapters';
214+
const detailUrl = 'https://api.copy2000.online/api/v3/comic2/' + seasonIdMatch[1];
215+
const chapterListUrl = 'https://api.copy2000.online/api/v3/comic/' + seasonIdMatch[1] +
216+
'/group/default/chapters';
215217
try {
216218
const detailRawResponse = await window.Rulia.httpRequest({
217219
url: detailUrl,
@@ -250,7 +252,7 @@ async function getMangaData(dataPageUrl) {
250252
async function getChapterImageList(chapterUrl) {
251253
const episodeIdMatchExp = /https?:\/\/www\.mangacopy\.com\/comic\/([a-zA-Z0-9_-]+)\/chapter\/([0-9a-f-]+)/;
252254
const episodeIdMatch = chapterUrl.match(episodeIdMatchExp);
253-
const url = 'https://www.copy20.com/api/v3/comic/' + episodeIdMatch[1] + '/chapter2/' + episodeIdMatch[2];
255+
const url = 'https://api.copy2000.online/api/v3/comic/' + episodeIdMatch[1] + '/chapter2/' + episodeIdMatch[2];
254256
const rawResponse = await window.Rulia.httpRequest({
255257
url: url,
256258
method: 'GET',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@rulia/CopyManga",
33
"title": "拷贝漫画",
44
"description": "拷贝漫画插件.",
5-
"version": "0.0.7",
5+
"version": "0.0.8",
66
"author": "LittleStar_OuO",
77
"tags": ["Copy", "Manga", "CopyManga"],
88
"homepage": "https://github.com/LittleStar-OuO/plugin.CopyManga",

0 commit comments

Comments
 (0)