rod

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ActionTypeHeader = "Mangoprovider-Action-Type"

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.7.0

type Action func(*rod.Page) error

type ActionType added in v0.7.0

type ActionType string
const (
	ActionManga   ActionType = "manga"
	ActionVolume  ActionType = "volume"
	ActionChapter ActionType = "chapter"
	ActionPage    ActionType = "page"
)

type TransportRod

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

TransportRod implementation of Transport used for colly.

func NewTransport

func NewTransport(
	loadWait time.Duration,
	localStorage map[string]string,
	actions map[ActionType]Action,
) *TransportRod

NewTransport creates a new transport with the browser setup.

func (*TransportRod) Close

func (t *TransportRod) Close() error

func (*TransportRod) RoundTrip

func (t *TransportRod) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip gets called on each colly request.

Jump to

Keyboard shortcuts

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