Documentation ¶
Overview ¶
Package plugins is a set of default pieces of functionality to use with the stevie-holdway/goatscrape package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAllLinks ¶
ExtractAllLinks simply extracts all the <a href="<urL>"> </a> in a page provided that they aren't silly like a hash. It also expands relative links automagically.
func RandomiseUserAgent ¶
RandomiseUserAgent fullfils the goscrape.PreRequestFunc type. It takes a http.Request and applies a random user agent to the 'User-Agent' header.
Types ¶
type BasicLinkStore ¶
func (*BasicLinkStore) AddToCrawl ¶
func (b *BasicLinkStore) AddToCrawl(link string)
func (*BasicLinkStore) GetLinks ¶
func (b *BasicLinkStore) GetLinks(amount int) []string
func (*BasicLinkStore) MoreToCrawl ¶
func (b *BasicLinkStore) MoreToCrawl() bool
func (*BasicLinkStore) MoveToCrawled ¶
func (b *BasicLinkStore) MoveToCrawled(link string)
Click to show internal directories.
Click to hide internal directories.