Documentation ¶
Overview ¶
Package crawler provides types and functions to run crawler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileFetcher ¶
type FileFetcher struct {
// contains filtered or unexported fields
}
FileFetcher is an implementation to fetch a content from a local file path.
func NewFileFetcher ¶
func NewFileFetcher(path string) *FileFetcher
NewFileFetcher returns a new *FileFetcher for the given file path.
type HTMLScraper ¶
HTMLScraper is a function wrapper for Scraper interface using goquery. [Deprecation] use github.com/speedland/go/crawler/html.HTMLScraper instead
type HTTPFetcher ¶
type HTTPFetcher struct {
// contains filtered or unexported fields
}
HTTPFetcher is an implementation to fetch a content from an url.
func NewHTTPFetcher ¶
func NewHTTPFetcher(url string, client *http.Client) *HTTPFetcher
NewHTTPFetcher returns a new *HTTPFetcher for the given url with http.Client. `client“ can be nil, then http.DefaultClient is used.
Click to show internal directories.
Click to hide internal directories.