Documentation
¶
Index ¶
- Variables
- func BookInfo(BookURL string) (s *store.Store, err error)
- func Chapter(BookURL string) (content []string, err error)
- func ChromedpBookInfo(BookURL string, logfile string) (s *store.Store, err error)
- func ClosePhantomJS()
- func InitPhantomJS()
- func PhBookInfo(BookURL string) (s *store.Store, err error)
- func PhChapter(BookURL string) (content []string, err error)
- func SingleSpace(s string) (r string)
- func Type1BookInfo(nameExpr, coverExpr, authorExpr, chapterExpr string) func(body io.Reader) (s *store.Store, err error)
- func Type1Chapter(expr string) func(body io.Reader) ([]string, error)
- func Type1Search(URL string, getReq func(s string) *http.Request, ...) func(s string) (result []ChaperSearchResult, err error)
- func Type1SearchAfter(URL string, getReq func(s string) *http.Request, ...) func(s string) (result []ChaperSearchResult, err error)
- func Type2Chapter(expr string, next func(doc *html.Node) *html.Node, ...) func(body io.Reader) ([]string, error)
- type ChaperSearchResult
- type ErrMethodMissing
- type ErrUnsupportSite
- type SearchFunc
- type SiteA
Constants ¶
This section is empty.
Variables ¶
View Source
var Sitepool = []SiteA{
dingdian,
biquge2,
biquge3,
}
Functions ¶
func ChromedpBookInfo ¶
func ClosePhantomJS ¶
func ClosePhantomJS()
func InitPhantomJS ¶
func InitPhantomJS()
func SingleSpace ¶ added in v0.1.2
func Type1BookInfo ¶ added in v0.1.3
func Type1BookInfo(nameExpr, coverExpr, authorExpr, chapterExpr string) func(body io.Reader) (s *store.Store, err error)
Type1BookInfo 书籍信息页,单页,无翻页,无分卷
func Type1Chapter ¶ added in v0.1.3
func Type1Search ¶ added in v0.1.3
func Type1Search( URL string, getReq func(s string) *http.Request, resultExpr, nameExpr, authorExpr string) func(s string) (result []ChaperSearchResult, err error)
Type1Search 搜索类型1: 搜索后得到302跳转或者列表的
func Type1SearchAfter ¶ added in v0.1.3
func Type1SearchAfter( URL string, getReq func(s string) *http.Request, resultExpr, nameExpr, authorExpr string, after func(r ChaperSearchResult) ChaperSearchResult) func(s string) (result []ChaperSearchResult, err error)
Type1SearchAfter 搜索类型1: 搜索后得到302跳转或者列表的
Types ¶
type ChaperSearchResult ¶ added in v0.1.2
func Search ¶ added in v0.1.2
func Search(s string) (result []ChaperSearchResult, err error)
type ErrMethodMissing ¶ added in v0.1.2
type ErrMethodMissing struct {
Site *SiteA
}
func (ErrMethodMissing) Error ¶ added in v0.1.2
func (e ErrMethodMissing) Error() string
type ErrUnsupportSite ¶
type ErrUnsupportSite struct {
Site string
}
func (ErrUnsupportSite) Error ¶
func (e ErrUnsupportSite) Error() string
type SearchFunc ¶ added in v0.1.3
type SearchFunc func(s string) (result []ChaperSearchResult, err error)
type SiteA ¶ added in v0.1.2
type SiteA struct { Name string // 站点名称 HomePage string // 站点首页 File string // match url, look that https://godoc.org/path#Match Match []string // search book on site Search func(s string) (result []ChaperSearchResult, err error) // parse fiction info by page body BookInfo func(body io.Reader) (s *store.Store, err error) // parse fiction chaper content by page body Chapter func(body io.Reader) (content []string, err error) }
Click to show internal directories.
Click to hide internal directories.