Skip to content

Commit

Permalink
部分失效网站修复 (#676)
Browse files Browse the repository at this point in the history
* 修复 有毒小说 #648

* 修复 #610

* 更新 25 中文网 的链接至 i25zw.com

* fix #450

* fix #410 纵横中文网

* 添加对 gongzicp.com 的支持

* 优化 zongheng.ts 中的变量声明方式
  • Loading branch information
ldm0206 authored Nov 2, 2024
1 parent b03935a commit b908e74
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 77 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ EPUB 文件请使用相应阅读器阅读。
| [笔趣阁小说网](http://www.biquge66.com/) ||| |
| [海棠小说网](http://m.haitangtxt.net/) ||| 部分文字被图片替换,请使用 HTML 版查看。<br>如需替换清理图片,请自行生成图片文字对照表。 |
| [笔趣阁](https://www.biquzw.la/) ||| |
| [25 中文网](http://www.25zw.org/) ||| |
| [25 中文网](http://www.i25zw.com/) ||| |
| [天域小说网](https://www.tycqzw.com/) ||| |
| [完本神站](https://www.wanben.org/) ||| |
| [燃文小说](https://www.ranwen.la) ||| |
| [望书阁](https://www.wangshuge.la/) ||| |
| [望书阁](https://www.wangshugu.org/) ||| |
| [百合小说网](https://m.baihexs.com/) ||| |
| [全书斋](https://www.quanshuzhai.com/) ||| |
| [蔷薇后花园](https://houhuayuan.xyz/) ||| |
Expand Down
19 changes: 11 additions & 8 deletions src/header.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
"*://book.qidian.com/info/*",
"*://www.jjwxc.net/onebook.php?novelid=*",
"*://www.gongzicp.com/novel-*.html",
"*://gongzicp.com/novel-*.html",
"*://m.gongzicp.com/novel-*.html",
"*://book.zongheng.com/showchapter/*.html",
"*://book.zongheng.com/book/*.html",
"*://www.zongheng.com/detail/*",
"*://huayu.zongheng.com/showchapter/*.html",
"*://huayu.zongheng.com/book/*.html",
"*://www.linovel.net/book/*.html",
Expand Down Expand Up @@ -146,15 +148,15 @@
"*://www.htlvbooks.com/*",
"*://dijiuben.com/*_*",
"*://www.biquzw.la/*_*/",
"*://www.25zw.org/*/",
"*://www.i25zw.com/*/",
"*://www.tycqzw.com/*_*/",
"*://www.kanunu8.com/*",
"*://www.ciyuanji.com/*",
"*://ciyuanji.com/*",
"*://m.xiaoshuowanben.com/*/",
"*://www.xiaoshuowanben.com/*/",
"*://www.ranwen.la/files/article/*/*/",
"*://www.wangshuge.la/books/*/*/",
"*://www.wangshugu.org/books/*/*/",
"*://m.baihexs.com/info-*/",
"*://www.quanshuzhai.com/book/*.html",
"*://masiro.me/admin/novelView?novel_id=*",
Expand Down Expand Up @@ -188,6 +190,7 @@
"*://www.xrzww.com/bookdetail/*",
"*://xrzww.com/bookdetail/*",
"*://www.youdubook.com/bookdetail/*",
"*://youdubook.com/bookdetail/*",
"*://colorful-fantasybooks.com/module/novel/info.php?*",
"*://www.dizishu.com/*/*/",
"*://www.ibiquge.la/*/*/",
Expand Down Expand Up @@ -248,11 +251,11 @@
"*://jpxs123.com/*/*/*.html",
"*://tongrenquan.org/tongren/*/*.html",
"*://tongrenquan.me/tongren/*/*.html",
"*://www.25zw.org/lastupdate/",
"*://www.25zw.org/postdate/",
"*://www.25zw.org/monthvisit/",
"*://www.25zw.org/goodnum/",
"*://www.25zw.org/goodnew/",
"*://www.i25zw.com/lastupdate/",
"*://www.i25zw.com/postdate/",
"*://www.i25zw.com/monthvisit/",
"*://www.i25zw.com/goodnum/",
"*://www.i25zw.com/goodnew/",
"*://dijiuben.com/*_*/*.html",
"*://ncode.syosetu.com/*/*/",
"*://novel18.syosetu.com/*/*/",
Expand Down Expand Up @@ -326,7 +329,7 @@
"poco.cn",
"dijiuzww.com",
"dijiushu.net",
"25zw.com",
"i25zw.com",
"sina.com.cn",
"ciyuanji.com",
"wanben.org",
Expand Down
8 changes: 5 additions & 3 deletions src/router/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = Jjwxc;
break;
}
case "www.zongheng.com":
case "book.zongheng.com":
case "huayu.zongheng.com": {
const { Zongheng } = await import("../rules/special/original/zongheng");
Expand All @@ -48,6 +49,7 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = Shuhai;
break;
}
case "gongzicp.com":
case "www.gongzicp.com":
case "m.gongzicp.com": {
const { Gongzicp } = await import("../rules/special/original/gongzicp");
Expand Down Expand Up @@ -196,7 +198,7 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = Xrzww;
break;
}
case "www.youdubook.com": {
case "www.youdubook.com": case "youdubook.com": {
const { Youdubook } = await import("../rules/special/original/youdubook");
ruleClass = Youdubook;
break;
Expand Down Expand Up @@ -428,7 +430,7 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = yibige();
break;
}
case "www.wangshuge.la": {
case "www.wangshugu.org": {
const { washuge } = await import("../rules/twoPage/washuge");
ruleClass = washuge();
break;
Expand Down Expand Up @@ -511,7 +513,7 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = biquwx();
break;
}
case "www.25zw.org": {
case "www.i25zw.com": {
const { c25zw } = await import("../rules/biquge/onePage");
ruleClass = c25zw();
break;
Expand Down
10 changes: 9 additions & 1 deletion src/router/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,16 @@ export function getUI(): () => UIObject {
}
};
}
case "www.zongheng.com":
case "book.zongheng.com":
case "huayu.zongheng.com": {
const style = document.createElement("style");
style.innerHTML = `
img {
font-size: 1em;
}
`;
document.head.appendChild(style);
return () => {
if (document.location.pathname.startsWith("/book/")) {
return {
Expand Down Expand Up @@ -235,7 +243,7 @@ export function getUI(): () => UIObject {
case "www.luoqiuzw.com":
case "dijiuben.com":
case "www.biquzw.la":
case "www.25zw.org":
case "www.i25zw.com":
case "www.tycqzw.com":
case "www.ranwen.la":
case "www.b5200.net":
Expand Down
4 changes: 2 additions & 2 deletions src/rules/onePage/original/alphapolis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const alphapolis = () =>
mkRuleClass({
bookUrl: document.location.href,
bookname: (
document.querySelector("h2.title") as HTMLElement
document.querySelector("h1.title") as HTMLElement
).innerText.trim(),
author: (
document.querySelector(
Expand All @@ -28,7 +28,7 @@ export const alphapolis = () =>
(aElem.querySelector(".title") as HTMLSpanElement)?.innerText.trim(),
sections: document.querySelectorAll(".episodes > h3"),
getSName: (sElem) => (sElem as HTMLElement).innerText.trim(),
getContent: (doc) => doc.querySelector("#novelBoby"),
getContent: (doc) => doc.querySelector("#novelBody"),
contentPatch: (content) => {
insertBrBeforeText(content);
return content;
Expand Down
4 changes: 2 additions & 2 deletions src/rules/special/original/youdubook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class Youdubook extends BaseRuleClass {
charset: string,
options: chapterOptions
): Promise<ChapterParseObject> {
const readNewUrl = new URL(`${options.apiBase}/api/readNew`);
const readNewUrl = new URL(`${options.apiBase}/api/readNovelByWeb`);
readNewUrl.searchParams.set("nid", options.nid.toString());
readNewUrl.searchParams.set("vid", options.vid.toString());
readNewUrl.searchParams.set("chapter_id", options.chapter_id.toString());
Expand All @@ -172,7 +172,7 @@ export class Youdubook extends BaseRuleClass {
options.chapter_order.toString()
);
readNewUrl.searchParams.set("showpic", false.toString());
readNewUrl.searchParams.set("is_cut", "");
//readNewUrl.searchParams.set("is_cut", "");

const resp = await fetch(readNewUrl.href, {
credentials: "include",
Expand Down
Loading

0 comments on commit b908e74

Please sign in to comment.