scrape

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cookies = make(map[string]string)

Cookies contains all HTTP cookies to send

View Source
var Headers = make(map[string]string)

Headers contains all HTTP headers to send

Functions

func Cookie(n string, v string)

func Get

func Get(url string, client ...*http.Client) (string, error)

func GetDetail

func GetDetail(purl string) string

func GetMainTable

func GetMainTable(s string) ([]string, error)

func GetTable

func GetTable(s string) ([]string, error)

func GetWithClient

func GetWithClient(url string, client *http.Client) (string, error)

GetWithClient returns the HTML returned by the url using a provided HTTP client

func Header(n string, v string)

Header sets a new HTTP header

func SetDebug

func SetDebug(d bool)

SetDebug sets the debug status Setting this to true causes the panics to be thrown and logged onto the console. Setting this to false causes the errors to be saved in the Error field in the returned struct.

func Tag

func Tag(s string) ([]string, []string, error)

Tag: returns station, incident, and error

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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