internal

package
v0.0.0-...-9c5be4f Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atoi

func Atoi(rawValue string) int

Atoi is equivalent to strconv.Atoi except it returns 0 on error.

func Download

func Download(client *http.Client, fileURL string, outFilePath string) (bool, int64)

Download is a utility function that downloads file into local machine at outFilePath.

func Itoa

func Itoa(rawValue int) string

Itoa is equivalent to strconv.Itoa

func MakeHTTPClient

func MakeHTTPClient() *http.Client

MakeHTTPClient returns a pointer to http.Client with a default cookiejar.Jar

func MakeProgressBarOutput

func MakeProgressBarOutput(downloadStartedAt *time.Time, bw int64, sc int, fc int, rc int) string

MakeProgressBarOutput returns formatted information shown by ProgressBar

func MakeRequest

func MakeRequest(method, url string, params *url.Values, headers []*Header) *http.Request

MakeRequest is a utility function to make a new http.Request instance with passed information (params, url, headers etc).

Types

type Header struct {
	Name  string
	Value string
}

Header is a http header item

type Options

type Options struct {
	Query    string
	Safe     bool
	Gif      bool
	Gray     bool
	Height   int
	Width    int
	TestMode bool
}

Options is collection of option used by scrapers to find specific data.

Jump to

Keyboard shortcuts

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