Skip to content

Commit c4f0201

Browse files
committed
Extract author for Novelbin
See: #974
1 parent da98ca7 commit c4f0201

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugin/js/parsers/NovelbinParser.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ class NovelbinParser extends Parser{
2121
return dom.querySelector("h3.title");
2222
}
2323

24+
extractAuthor(dom) {
25+
let items = [...dom.querySelectorAll("ul.info-meta li")]
26+
.filter(u => u.querySelector("h3")?.textContent === "Author:")
27+
.map(u => u.querySelector("a")?.textContent)
28+
return 0 < items.length
29+
? items[0]
30+
: super.extractAuthor(dom);
31+
}
32+
2433
findChapterTitle(dom) {
2534
return dom.querySelector("h2");
2635
}

0 commit comments

Comments
 (0)