diff --git a/plugin/js/parsers/NovelhiParser.js b/plugin/js/parsers/NovelhiParser.js index e38b27c8..49a2e7d5 100644 --- a/plugin/js/parsers/NovelhiParser.js +++ b/plugin/js/parsers/NovelhiParser.js @@ -8,17 +8,16 @@ class NovelhiParser extends Parser { } async getChapterUrls(dom) { - let tocUrl = dom.querySelector("div.bookChapter a.fr"); + let tocUrl = dom.querySelector("div.bookChapter a.fr").href; let tocDom = (await HttpClient.wrapFetch(tocUrl)).responseXML; return [...tocDom.querySelectorAll("div.dirList a")] .map(a => NovelhiParser.LinkToChapter(a, dom.baseURI)); } static LinkToChapter(link, baseURI) { - let onclick = link.getAttribute("onClick").split("'"); return { - sourceUrl: baseURI + "/" + onclick[1], - title: link.querySelector("span").textContent + sourceUrl: link.href, + title: link.querySelector("span").textContent }; }