Skip to content

Commit

Permalink
(*)support www.kanshula.com
Browse files Browse the repository at this point in the history
  • Loading branch information
missdeer committed Jan 10, 2019
1 parent c663562 commit 5e0c1e6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions biquge.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,31 @@ func init() {
},
})

registerNovelSiteHandler(&novelSiteHandler{
Title: `看书啦`,
MatchPatterns: []string{`https://www\.kanshula\.com/book/[0-9a-zA-Z]+/`},
Download: func(u string, gen ebook.IBook) {
tocPatterns := []tocPattern{
{
host: "www.kanshula.com",
bookTitle: `<h1>([^<]+)</h1>$`,
bookTitlePos: 1,
item: `<dd>\s*<a\s+href="([^"]+)"(\sclass="empty")?>([^<]+)</a></dd>$`,
articleURLPos: 1,
articleTitlePos: 3,
isAbsoluteURL: true,
},
}
pageContentMarkers := []pageContentMarker{
{
host: "www.kanshula.com",
start: []byte(`<div id="content">`),
end: []byte(`</div>`),
},
}
dl(u, gen, tocPatterns, pageContentMarkers)
},
})
registerNovelSiteHandler(&novelSiteHandler{
Title: `少年文学网`,
MatchPatterns: []string{`https://www\.snwx8\.com/book/[0-9]+/[0-9]+/`},
Expand Down

0 comments on commit 5e0c1e6

Please sign in to comment.