Documentation
¶
Index ¶
- Variables
- func Count(file *os.File)
- func CountWordsAndImages(url string) (words, images int, err error)
- func Crawl(url string) []string
- func ElementByID(doc *html.Node, id string) *html.Node
- func ElementByTagName(n *html.Node, tags ...string) []*html.Node
- func EndElement(n *html.Node) bool
- func Extract(url string) ([]string, error)
- func FindLinks(url string) ([]string, error)
- func FindLinks2(url string) (*html.Node, error)
- func ForEachNode(n *html.Node, pre, post func(*html.Node) bool)
- func StartElement(n *html.Node) bool
- func Title(url string) error
- func Visit(file *os.File, option string)
- func WaitForServer(url string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Id string
Functions ¶
func CountWordsAndImages ¶
CountWordsAndImages does an HTTP GET request for the HTML document url and returns the number of words and images in it.
func ElementByTagName ¶
ElementByTagName will return tag name match nodes
func FindLinks ¶
FindLinks performs an HTTP GET request for url, parses the response as HTML, and extracts and returns the links.
func FindLinks2 ¶
FindLinks2 will return url html node
func ForEachNode ¶
ForEachNode is a func, traversal html doc
func WaitForServer ¶
WaitForServer attempts to contact the server of a URL. It tries for one minute using exponential back-off. It reports an error if all attempts fail.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.