Skip to content

Commit 107cfe9

Browse files
authored
update LightNovelsTranslationsParser with author
1 parent 92c276b commit 107cfe9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

plugin/js/parsers/LightNovelsTranslationsParser.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,13 @@ class LightNovelsTranslationsParser extends WordpressBaseParser {
2727
getInformationEpubItemChildNodes(dom) {
2828
return [...dom.querySelectorAll("div.novel_text")];
2929
}
30+
31+
extractAuthor(dom) {
32+
const authorEl = dom.querySelector("div.novel_detail_info > ul > li:nth-child(1)");
33+
if (authorEl) {
34+
return authorEl.textContent.replace("Author: ", "");
35+
}
36+
37+
return "<unknown>";
38+
}
3039
}

0 commit comments

Comments
 (0)