Skip to content

Commit e022a90

Browse files
committed
1 parent 7aacf53 commit e022a90

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"use strict";
2+
3+
parserFactory.register("bookswithqianya.com", () => new BookswithqianyaParser());
4+
5+
class BookswithqianyaParser extends WordpressBaseParser{
6+
constructor() {
7+
super();
8+
}
9+
10+
async getChapterUrls(dom) {
11+
return [...dom.querySelectorAll("div.elementor-tab-content a")]
12+
.map(a => util.hyperLinkToChapter(a))
13+
.filter(c => this.isChapterUrl(c.sourceUrl));
14+
}
15+
16+
isChapterUrl(url) {
17+
return !url.includes("/products/")
18+
&& !url.includes("/novels/")
19+
&& !url.includes("myrics");
20+
}
21+
22+
extractTitleImpl(dom) {
23+
return dom.querySelector(".elementor-image-box-title");
24+
}
25+
26+
removeUnwantedElementsFromContentElement(element) {
27+
util.removeChildElementsMatchingCss(element, "button");
28+
super.removeUnwantedElementsFromContentElement(element);
29+
}
30+
}

plugin/popup.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ <h3>Instructions</h3>
542542
<script src="js/parsers/BetwixtedbutterflyParser.js"></script>
543543
<script src="js/parsers/BlogspotParser.js"></script>
544544
<script src="js/parsers/BookalbParser.js"></script>
545+
<script src="js/parsers/BookswithqianyaParser.js"></script>
545546
<script src="js/parsers/Booktoki152Parser.js"></script>
546547
<script src="js/parsers/BoxnovelOrgParser.js"></script>
547548
<script src="js/parsers/Bqg225Parser.js"></script>

0 commit comments

Comments
 (0)