-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1176 from ImLJS/Zeta
Add Site www.cyborg-tl.com
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"use strict"; | ||
|
||
parserFactory.register("cyborg-tl.com", function () {return new CyborgParser();}); | ||
|
||
class CyborgParser extends Parser { | ||
constructor() { | ||
super(); | ||
} | ||
|
||
async getChapterUrls(dom) { | ||
return ([...dom.querySelectorAll("div.lightnovel-episode a")] | ||
.map(link => ({ | ||
sourceUrl: link.href, | ||
title: link.title, | ||
}))).reverse(); | ||
} | ||
|
||
findContent(dom) { | ||
return ( | ||
dom.querySelector(".entry-content") || dom.querySelector("#chapter-content") | ||
); | ||
} | ||
|
||
extractTitleImpl(dom) { | ||
return dom.querySelector(".entry-title"); | ||
} | ||
|
||
findChapterTitle(dom) { | ||
return dom.querySelector("strong"); | ||
} | ||
|
||
findCoverImageUrl(dom) { | ||
return util.getFirstImgSrc(dom, "div.lightnovel-thumb"); | ||
} | ||
|
||
getInformationEpubItemChildNodes(dom) { | ||
return [...dom.querySelectorAll("div.lightnovel-synopsis")]; | ||
} | ||
|
||
removeUnwantedElementsFromContentElement(element) { | ||
let mark = [...element.querySelectorAll("#hpk")]; | ||
mark[0].nextElementSibling.remove(); | ||
mark[0].remove() | ||
super.removeUnwantedElementsFromContentElement(element); | ||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters