Documentation ¶
Index ¶
- Constants
- type CzbooksNoveler
- func (n *CzbooksNoveler) GetChapterURLs() ([]NovelChapter, error)
- func (n *CzbooksNoveler) GetInfo() error
- func (n *CzbooksNoveler) GetName() string
- func (n *CzbooksNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
- func (n *CzbooksNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
- type HjwzwNoveler
- func (n *HjwzwNoveler) GetChapterURLs() ([]NovelChapter, error)
- func (n *HjwzwNoveler) GetInfo() error
- func (n *HjwzwNoveler) GetName() string
- func (n *HjwzwNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
- func (n *HjwzwNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
- type NovelChapter
- type NovelChapterHTML
- type Noveler
- type PtwxzNoveler
- func (n *PtwxzNoveler) GetChapterURLs() ([]NovelChapter, error)
- func (n *PtwxzNoveler) GetInfo() error
- func (n *PtwxzNoveler) GetName() string
- func (n *PtwxzNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
- func (n *PtwxzNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
- type UUkanshuNoveler
- func (n *UUkanshuNoveler) GetChapterURLs() ([]NovelChapter, error)
- func (n *UUkanshuNoveler) GetInfo() error
- func (n *UUkanshuNoveler) GetName() string
- func (n *UUkanshuNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
- func (n *UUkanshuNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
- type WanbentxtNoveler
- func (n *WanbentxtNoveler) GetChapterURLs() ([]NovelChapter, error)
- func (n *WanbentxtNoveler) GetInfo() error
- func (n *WanbentxtNoveler) GetName() string
- func (n *WanbentxtNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
- func (n *WanbentxtNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
Constants ¶
const Timeout = 60 * time.Second
Timeout Context 的 timeout
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CzbooksNoveler ¶
type CzbooksNoveler struct { URL string // contains filtered or unexported fields }
CzbooksNoveler 小說狂人的 Noveler
func NewCzbooksNoveler ¶
func NewCzbooksNoveler(url string) *CzbooksNoveler
NewCzbooksNoveler 建立 CzbooksNoveler
func (*CzbooksNoveler) GetChapterURLs ¶
func (n *CzbooksNoveler) GetChapterURLs() ([]NovelChapter, error)
GetChapterURLs 獲得所有章節的網址
func (*CzbooksNoveler) GetParseResult ¶
func (n *CzbooksNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
GetParseResult 獲得 章節的內容 & 下一頁的連結
func (*CzbooksNoveler) MergeContent ¶
func (n *CzbooksNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
MergeContent 合併章節
type HjwzwNoveler ¶
type HjwzwNoveler struct { URL string // contains filtered or unexported fields }
HjwzwNoveler 黃金屋的 Noveler
func NewHjwzwNoveler ¶
func NewHjwzwNoveler(url string) *HjwzwNoveler
NewHjwzwNoveler 建立 HjwzwNoveler
func (*HjwzwNoveler) GetChapterURLs ¶
func (n *HjwzwNoveler) GetChapterURLs() ([]NovelChapter, error)
GetChapterURLs 獲得所有章節的網址
func (*HjwzwNoveler) GetParseResult ¶
func (n *HjwzwNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
GetParseResult 獲得 章節的內容 & 下一頁的連結
func (*HjwzwNoveler) MergeContent ¶
func (n *HjwzwNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
MergeContent 合併章節
type NovelChapter ¶
NovelChapter 小說章節網址
func (NovelChapter) MarshalText ¶
func (n NovelChapter) MarshalText() ([]byte, error)
MarshalText 為了 map 的 key,所以 NovelChapter 不是 pointer
func (*NovelChapter) UnmarshalText ¶
func (n *NovelChapter) UnmarshalText(text []byte) error
UnmarshalText 為了 unmarshal 後能填入值,所以是 *NovelChapter
type NovelChapterHTML ¶
type NovelChapterHTML struct { NovelChapter Text string }
NovelChapterHTML 小說章節的 HTML
type Noveler ¶
type Noveler interface { // 得到小說名字 GetName() string // 獲得小說基本資料 GetInfo() error // 獲得和所有章節的網址 GetChapterURLs() ([]NovelChapter, error) // 獲得 章節的內容 下一頁的連結 GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error) // 合併章節 MergeContent(fileNames []string, fromPath, toPath string) error // contains filtered or unexported methods }
Noveler 抓取小說必需的 function
type PtwxzNoveler ¶
type PtwxzNoveler struct { URL string // contains filtered or unexported fields }
PtwxzNoveler 飄天文學的 Noveler
func NewPtwxzNoveler ¶
func NewPtwxzNoveler(url string) *PtwxzNoveler
NewPtwxzNoveler 建立 PtwxzNoveler
func (*PtwxzNoveler) GetChapterURLs ¶
func (n *PtwxzNoveler) GetChapterURLs() ([]NovelChapter, error)
GetChapterURLs 獲得所有章節的網址
func (*PtwxzNoveler) GetParseResult ¶
func (n *PtwxzNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
GetParseResult 獲得 章節的內容 & 下一頁的連結
func (*PtwxzNoveler) MergeContent ¶
func (n *PtwxzNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
MergeContent 合併章節
type UUkanshuNoveler ¶
type UUkanshuNoveler struct { URL string // contains filtered or unexported fields }
UUkanshuNoveler UU看書網的 Noveler
func NewUUkanshuNoveler ¶
func NewUUkanshuNoveler(url string) *UUkanshuNoveler
NewUUkanshuNoveler 建立 UUkanshuNoveler
func (*UUkanshuNoveler) GetChapterURLs ¶
func (n *UUkanshuNoveler) GetChapterURLs() ([]NovelChapter, error)
GetChapterURLs 獲得所有章節的網址
func (*UUkanshuNoveler) GetParseResult ¶
func (n *UUkanshuNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
GetParseResult 獲得 章節的內容 & 下一頁的連結
func (*UUkanshuNoveler) MergeContent ¶
func (n *UUkanshuNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
MergeContent 合併章節
type WanbentxtNoveler ¶
type WanbentxtNoveler struct { URL string // contains filtered or unexported fields }
WanbentxtNoveler 完本神站的 Noveler
func NewWanbentxtNoveler ¶
func NewWanbentxtNoveler(url string) *WanbentxtNoveler
NewWanbentxtNoveler 建立 WanbentxtNoveler
func (*WanbentxtNoveler) GetChapterURLs ¶
func (n *WanbentxtNoveler) GetChapterURLs() ([]NovelChapter, error)
GetChapterURLs 獲得所有章節的網址
func (*WanbentxtNoveler) GetParseResult ¶
func (n *WanbentxtNoveler) GetParseResult(req concurrencyengine.Request) (concurrencyengine.ParseResult, error)
GetParseResult 獲得 章節的內容 & 下一頁的連結
func (*WanbentxtNoveler) MergeContent ¶
func (n *WanbentxtNoveler) MergeContent(fileNames []string, fromPath, toPath string) error
MergeContent 合併章節