Compare commits

...

3 Commits

Author SHA1 Message Date
Ftbom
8d469bce4d fix ccc bugs (#209)
* fix ccc bugs

* update ccc.js
2025-12-09 20:58:46 +08:00
sakana164
0e36a2a97c fix wnacg version (#208) 2025-12-09 20:58:20 +08:00
Z-Biner
5a323c416b EHentai添加上传者标签搜索 (#207)
* EHentai添加上传者搜索

通过把uploader添加到tags里,实现点击操作,并将原本的uploader注释掉。并添加翻译。
属于临时方案,如果有更好的方案,可以更改。

* 更新 index.json
2025-12-09 20:57:57 +08:00
4 changed files with 31 additions and 14 deletions

28
ccc.js
View File

@@ -8,7 +8,7 @@ class CCC extends ComicSource {
// unique id of the source // unique id of the source
key = "ccc" key = "ccc"
version = "1.0.0" version = "1.0.1"
minAppVersion = "1.6.0" minAppVersion = "1.6.0"
@@ -40,7 +40,16 @@ class CCC extends ComicSource {
"client_secret": "9eAhsCX3VWtyqTmkUo5EEaoH4MNPxrn6ZRwse7tE", "client_secret": "9eAhsCX3VWtyqTmkUo5EEaoH4MNPxrn6ZRwse7tE",
"refresh_token": this.loadData("refreshToken") "refresh_token": this.loadData("refreshToken")
}); });
this.processToken(res.body); if (res.body.search("Token has been revoked") == -1) {
this.processToken(res.body);
} else {
const accountData = this.loadData("account");
if (accountData) {
await this.account.login(accountData[0], accountData[1]);
} else {
throw "請重新登錄";
}
}
token = this.loadData("token"); token = this.loadData("token");
} }
return { return {
@@ -76,7 +85,7 @@ class CCC extends ComicSource {
title: c["name"], title: c["name"],
subtitle: c["brief"], subtitle: c["brief"],
description: c["description"], description: c["description"],
cover: c["image1"], cover: c["image1"]??c["image2"]??c["image3"],
tags: tags tags: tags
}); });
} }
@@ -185,7 +194,7 @@ class CCC extends ComicSource {
const jsonData = JSON.parse(res.body)["data"]; const jsonData = JSON.parse(res.body)["data"];
let curTitle = null; let curTitle = null;
for (let data of jsonData["templates"]) { for (let data of jsonData["templates"]) {
if (data["type"] == 4) { if ([4, 5].indexOf(data["type"]) != -1) {
continue; continue;
} }
const comics = []; const comics = [];
@@ -193,7 +202,7 @@ class CCC extends ComicSource {
comics.push({ comics.push({
id: c["value"], id: c["value"],
title: c["name"], title: c["name"],
cover: c["image1"], cover: c["image1"]??c["image2"]??c["image3"],
tags: [c["book_type"]["name"]], tags: [c["book_type"]["name"]],
subtitle: c["brief"] subtitle: c["brief"]
}); });
@@ -539,7 +548,7 @@ class CCC extends ComicSource {
for (let r of recommendData["hot"]) { for (let r of recommendData["hot"]) {
recommends.push({ recommends.push({
title: r["name"], title: r["name"],
cover: r["image1"], cover: r["image1"]??r["image2"]??r["image3"],
id: r["id"].toString(), id: r["id"].toString(),
subtitle: r["brief"] subtitle: r["brief"]
}); });
@@ -547,21 +556,21 @@ class CCC extends ComicSource {
for (let r of recommendData["history"]) { for (let r of recommendData["history"]) {
recommends.push({ recommends.push({
title: r["name"], title: r["name"],
cover: r["image1"], cover: r["image1"]??r["image2"]??r["image3"],
id: r["id"].toString() id: r["id"].toString()
}); });
} }
for (let r of recommendData["also_buy"]) { for (let r of recommendData["also_buy"]) {
recommends.push({ recommends.push({
title: r["name"], title: r["name"],
cover: r["image1"], cover: r["image1"]??r["image2"]??r["image3"],
id: r["id"].toString() id: r["id"].toString()
}); });
} }
return new ComicDetails({ return new ComicDetails({
title: jsonData["name"], title: jsonData["name"],
subtitle: jsonData["brief"], subtitle: jsonData["brief"],
cover: jsonData["image1"], cover: jsonData["image1"]??jsonData["image2"]??jsonData["image3"],
description: jsonData["description"], description: jsonData["description"],
likesCount: jsonData["like_count_only_uuid"], likesCount: jsonData["like_count_only_uuid"],
chapters: chapters, chapters: chapters,
@@ -755,4 +764,5 @@ class CCC extends ComicSource {
} }
}, },
} }
} }

View File

@@ -7,7 +7,7 @@ class Ehentai extends ComicSource {
// unique id of the source // unique id of the source
key = "ehentai" key = "ehentai"
version = "1.1.7" version = "1.1.8"
minAppVersion = "1.5.3" minAppVersion = "1.5.3"
@@ -738,6 +738,10 @@ class Ehentai extends ComicSource {
let category = document.querySelector("div.cs").text; let category = document.querySelector("div.cs").text;
tags.set("Category", [category]) tags.set("Category", [category])
if (uploader) {
tags.set("uploader", [uploader]);
}
let time = document.querySelector("div#gdd > table > tbody > tr > td.gdt2").text let time = document.querySelector("div#gdd > table > tbody > tr > td.gdt2").text
let script = document.querySelectorAll("script").find((e) => e.text.includes("var token")); let script = document.querySelectorAll("script").find((e) => e.text.includes("var token"));
@@ -763,7 +767,7 @@ class Ehentai extends ComicSource {
stars: stars, stars: stars,
maxPage: Number(maxPage), maxPage: Number(maxPage),
isFavorite: isFavorited, isFavorite: isFavorited,
uploader: uploader, // uploader: uploader,
uploadTime: time, uploadTime: time,
url: id, url: id,
comments: comments.comments, comments: comments.comments,
@@ -1450,6 +1454,7 @@ class Ehentai extends ComicSource {
"group": "团队", "group": "团队",
"cosplayer": "Coser", "cosplayer": "Coser",
"reclass": "重新分类", "reclass": "重新分类",
"uploader": "上传者",
"Languages": "语言", "Languages": "语言",
"Artists": "画师", "Artists": "画师",
"Characters": "角色", "Characters": "角色",
@@ -1486,6 +1491,7 @@ class Ehentai extends ComicSource {
"group": "團隊", "group": "團隊",
"cosplayer": "Coser", "cosplayer": "Coser",
"reclass": "重新分類", "reclass": "重新分類",
"uploader": "上傳者",
"Languages": "語言", "Languages": "語言",
"Artists": "畫師", "Artists": "畫師",
"Characters": "角色", "Characters": "角色",
@@ -1522,6 +1528,7 @@ class Ehentai extends ComicSource {
"group": "Group", "group": "Group",
"cosplayer": "Cosplayer", "cosplayer": "Cosplayer",
"reclass": "Reclass", "reclass": "Reclass",
"uploader": "Uploader",
"Languages": "Languages", "Languages": "Languages",
"Artists": "Artists", "Artists": "Artists",
"Characters": "Characters", "Characters": "Characters",

View File

@@ -40,7 +40,7 @@
"name": "ehentai", "name": "ehentai",
"fileName": "ehentai.js", "fileName": "ehentai.js",
"key": "ehentai", "key": "ehentai",
"version": "1.1.7" "version": "1.1.8"
}, },
{ {
"name": "禁漫天堂", "name": "禁漫天堂",
@@ -132,7 +132,7 @@
"name": "CCC追漫台", "name": "CCC追漫台",
"fileName": "ccc.js", "fileName": "ccc.js",
"key": "ccc", "key": "ccc",
"version": "1.0.0" "version": "1.0.1"
}, },
{ {
"name": "GoDa漫画", "name": "GoDa漫画",

View File

@@ -7,7 +7,7 @@ class Wnacg extends ComicSource {
// unique id of the source // unique id of the source
key = "wnacg" key = "wnacg"
version = "1.0.5" version = "1.0.4"
minAppVersion = "1.0.0" minAppVersion = "1.0.0"