scraper

package
v0.0.0-...-24035bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsoluteURL

func AbsoluteURL(base, ref string) (string, error)
func GetFirstAcestreamLink(res *http.Response) (string, error)

GetFirstAcestreamLink returns the first Acestream link of the page

func NewDocumentFromFile

func NewDocumentFromFile(path string) (*goquery.Document, error)

NewDocumentFromFile returns a goquery.Document from a file.

func NewDocumentFromString

func NewDocumentFromString(html string) (*goquery.Document, error)

NewDocumentFromString returns a goquery.Document from a string.

Types

type URLGetter

type URLGetter interface {
	Get(url string) (*http.Response, error)
	Do(*http.Request) (*http.Response, error)
}

URLGetter interface defines the methods needed to get an URL. A standard http.Client satisfy the interface.

func DefaultURLGetter

func DefaultURLGetter() URLGetter

DefaultURLGetter returns an http.Client as the default URL getter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL