Documentation
¶
Index ¶
Constants ¶
View Source
const ( RootURL = "http://www.juemei.com" MaxWorks = 1 )
View Source
const ( RedisKeyPrefix = "juemei_" // redis key 前缀 KeySetToDo = RedisKeyPrefix + "todo" // 未爬取的页面链接 KeySetDoing = RedisKeyPrefix + "doing" // 正在处理的页面 KeySetDone = RedisKeyPrefix + "done" // 已爬取完成的页面 KeySetImgs = RedisKeyPrefix + "imgs" // 爬取的图片链接 KeySetOutLinks = RedisKeyPrefix + "out_links" // 外链 )
Variables ¶
View Source
var ( BlackPrefix = []string{ RootURL, } IgnorePrefix = []string{ "#", } )
Functions ¶
Types ¶
type RedisStore ¶
func NewRedisStore ¶
func NewRedisStore(cli *redis.Client) *RedisStore
func (*RedisStore) Done ¶
func (r *RedisStore) Done(rets ...*ResolveResult) (*StoreResult, error)
func (*RedisStore) Init ¶
func (r *RedisStore) Init() error
type ResolveResult ¶
func Resolve ¶
func Resolve(cli *httpclient.Client, doc *goquery.Document) (*ResolveResult, error)
type StoreResult ¶
Click to show internal directories.
Click to hide internal directories.