Skip to content

Commit

Permalink
add site
Browse files Browse the repository at this point in the history
  • Loading branch information
ZxwyWebSite committed Jun 29, 2023
1 parent 42bb0d8 commit 3dbe735
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ EPUB 文件请使用相应阅读器阅读。
| [38 看书](https://www.mijiashe.com/) ||| |
| [天天看小说](https://www.ttkan.co/) ||| |
| [精华书阁](https://www.xbyuan.com/) ||| |
| [全职小说网](http://www.quanzhifashi.com/) ||| |
| [全职小说网](http://www.quanzhifashi.com/) ||| 网站反爬较严,大量抓取可能导致封禁ip。 |
| [笔趣阁](https://www.42zw.la/) ||| |
| [新笔趣阁](http://www.boqugew.com/) ||| |
| [全本同人小说](https://www.qbtr.cc/) ||| |

</details>

Expand Down
5 changes: 4 additions & 1 deletion src/header.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@
"*://tw.ttkan.co/novel/chapters/*",
"*://www.xiaoshuowanben.com/*/",
"*://www.xbyuan.com/*/",
"*://www.quanzhifashi.com/novel/*/"
"*://www.quanzhifashi.com/novel/*/",
"*://www.42zw.la/book/*/",
"*://www.boqugew.com/shu/*/",
"*://www.qbtr.cc/*"
],
"exclude": [
"*://www.jjwxc.net/onebook.php?novelid=*&chapterid=*",
Expand Down
15 changes: 15 additions & 0 deletions src/router/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,16 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = qzxsw();
break;
}
case "www.boqugew.com": {
const { boqugew } = await import("../rules/onePage/boqugew");
ruleClass = boqugew();
break;
}
case "www.qbtr.cc": {
const { qbtrcc } = await import("../rules/onePage/qbtrcc");
ruleClass = qbtrcc();
break;
}
/* onePage End */

/* onePageWithMultiIndexPage End */
Expand Down Expand Up @@ -582,6 +592,11 @@ export async function getRule(): Promise<BaseRuleClass> {
ruleClass = c226ks();
break;
}
case "www.42zw.la": {
const { la42zw } = await import("../rules/biquge/onePage")
ruleClass = la42zw();
break;
}
/** 笔趣阁END **/

default: {
Expand Down
3 changes: 3 additions & 0 deletions src/router/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ export function getUI(): () => UIObject {
};
}
case "www.quanzhifashi.com":
case "www.42zw.la":
case "www.boqugew.com":
case "www.qbtr.cc":
default: {
return () => {
return defaultObject;
Expand Down
15 changes: 15 additions & 0 deletions src/rules/biquge/onePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,18 @@ export const xyb3 = () =>
return content;
}
);

export const la42zw = () =>
mkBiquge(
(introDom) => introDom,
(content) => {
rm("div#content > p:first-child", false, content);
rms([
"首发网址https://m.42zw.la",
"记住网址m.42zw.la",
"一秒记住https://m.42zw.la"
],content);
rm("br", true, content);
return content;
}
);
27 changes: 27 additions & 0 deletions src/rules/onePage/boqugew.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { rm, rms } from "../../lib/dom";
import { mkRuleClass } from "./template";

export const boqugew = () =>
mkRuleClass({
bookUrl: document.location.href,
bookname: (
document.querySelector("h1.bookTitle") as HTMLHeadElement
).innerText.trim(),
author: (
document.querySelector("p.booktag > a:first-child") as HTMLAnchorElement
).innerText.replace(/(\s+)?[:]/, "").trim(),
introDom: document.querySelector("p#bookIntro") as HTMLElement,
introDomPatch: (introDom) => introDom,
coverUrl: (document.querySelector("img.img-thumbnail") as HTMLImageElement).src,
aList: document.querySelectorAll("div#list-chapterAll > dl > dd > a"),
getContent: (doc) => doc.querySelector("div#htmlContent") as HTMLElement,
contentPatch: (content) => {
rms([
"记住网址m.boqugew.com",
"一秒记住http://m.boqugew.com",
"首发网址http://m.boqugew.com"
], content);
rm("br", true, content);
return content;
},
});
18 changes: 18 additions & 0 deletions src/rules/onePage/qbtrcc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { mkRuleClass } from "./template";

export const qbtrcc = () =>
mkRuleClass({
bookUrl: document.location.href,
bookname: (
document.querySelector("div.infos > h1") as HTMLHeadElement
).innerText.trim(),
author: (
document.querySelector("div.infos > div.date > span") as HTMLAnchorElement
).innerText.replace("作者:", "").trim(),
introDom: document.querySelector("div.infos > p") as HTMLElement,
introDomPatch: (introDom) => introDom,
coverUrl: "https://www.qbtr.cc/skin/default/images/bbb2.png",
aList: document.querySelectorAll("ul.clearfix > li > a"),
getContent: (doc) => doc.querySelector("div.read_chapterDetail") as HTMLElement,
contentPatch: (content) => content,
});
8 changes: 4 additions & 4 deletions src/rules/onePage/qzxsw.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { rm2 } from "../../lib/dom";
import { rm, rms } from "../../lib/dom";
import { mkRuleClass } from "./template";

export const qzxsw = () =>
Expand All @@ -16,12 +16,12 @@ export const qzxsw = () =>
aList: document.querySelectorAll("div.ml_list > ul > li > a"),
getContent: (doc) => doc.querySelector(".articlecontent") as HTMLElement,
contentPatch: (content) => {
const ads = [
rms([
"一秒记住m.quanzhifashi。com",
"m.quanzhifashi.com",
"http://m.quanzhifashi.com首发"
];
rm2(ads, content);
], content);
rm("br", true, content);
return content;
},
});

0 comments on commit 3dbe735

Please sign in to comment.