Documentation
¶
Index ¶
- Variables
- func Cookie(n string, v string)
- func Get(url string) (string, error)
- func GetWithClient(url string, client *http.Client) (string, error)
- func Header(n string, v string)
- func SetDebug(d bool)
- type Root
- func (r Root) Attributes() map[string]string
- func (r Root) Children(parameters ...bool) []Root
- func (r Root) Find(args ...string) Root
- func (r Root) FindAll(args ...string) []Root
- func (r Root) FindAllStrict(args ...string) []Root
- func (r Root) FindNextElementSibling() Root
- func (r Root) FindNextSibling() Root
- func (r Root) FindParent() Root
- func (r Root) FindPrevElementSibling() Root
- func (r Root) FindPrevSibling() Root
- func (r Root) FindStrict(args ...string) Root
- func (r Root) FullText() string
- func (r Root) GetAttribute(attributeToFind string) string
- func (r Root) HasAttribute(attributeToFind string) bool
- func (r Root) Siblings(parameters ...bool) []Root
- func (r Root) Text() string
Constants ¶
This section is empty.
Variables ¶
var Cookies = make(map[string]string)
Cookies contains all HTTP cookies to send
var Headers = make(map[string]string)
Headers contains all HTTP headers to send
Functions ¶
func GetWithClient ¶ added in v1.1.1
GetWithClient returns the HTML returned by the url using a provided HTTP client
Types ¶
type Root ¶
Root is a structure containing a pointer to an html node, the node value, and an error variable to return an error if occurred
func (Root) Attributes ¶ added in v1.2.1
Attrs returns a map containing all attributes
func (Root) Children ¶ added in v1.1.1
Children returns all direct children of this DOME element. passing true will make it possible to get all children, also the one's which are not html-nodes
func (Root) Find ¶
Find finds the first occurrence of the given tag name, with or without attribute key and value specified, and returns a struct with a pointer to it
func (Root) FindAll ¶
FindAllStrict finds all occurrences of the given tag name only if all the values of the provided attribute are an exact match
func (Root) FindAllStrict ¶ added in v1.1.1
FindAllStrict finds all occurrences of the given tag name only if all the values of the provided attribute are an exact match
func (Root) FindNextElementSibling ¶
FindNextElementSibling finds the next element sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindNextSibling ¶
FindNextSibling finds the next sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindParent ¶ added in v1.2.1
FindParent returns the parent element
func (Root) FindPrevElementSibling ¶
FindPrevElementSibling finds the previous element sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindPrevSibling ¶
FindPrevSibling finds the previous sibling of the pointer in the DOM returning a struct with a pointer to it
func (Root) FindStrict ¶ added in v1.1.1
FindStrict finds the first occurrence of the given tag name only if all the values of the provided attribute are an exact match
func (Root) GetAttribute ¶ added in v1.2.1
checks if the HTML Node has the given attribute
func (Root) HasAttribute ¶ added in v1.2.1
checks if the HTML Node has the given attribute