browser

package
v0.0.0-...-1d26606 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromeFormatFlag

func ChromeFormatFlag(f string) (string, interface{}, error)

ChromeFormatFlag takes a variety of possible flag formats and puts them in a format that chromedp understands (key/value)

func DebuggerScriptParsed

func DebuggerScriptParsed(eventChan chan *debugger.EventScriptParsed, rawResult *b.RawResult, wg *sync.WaitGroup, ctxt context.Context)

DebuggerScriptParsed is the event handler for network requests which have been paused

func FetchRequestPaused

func FetchRequestPaused(eventChan chan *fetch.EventRequestPaused, rawResult *b.RawResult, devtoolsState *DTState, wg *sync.WaitGroup, ctxt context.Context)

FetchRequestPaused is the event handler for network requests which have been paused

func NetworkLoadingFinished

func NetworkLoadingFinished(eventChan chan *network.EventLoadingFinished, rawResult *b.RawResult, wg *sync.WaitGroup, ctxt context.Context, log *logrus.Logger)

NetworkLoadingFinished is the event handler for the Network.LoadingFinished event

func NetworkRequestWillBeSent

func NetworkRequestWillBeSent(eventChan chan *network.EventRequestWillBeSent, rawResult *b.RawResult, wg *sync.WaitGroup, ctxt context.Context)

NetworkRequestWillBeSent is the event handler for the Network.RequestWillBeSent event

func NetworkResponseReceived

func NetworkResponseReceived(eventChan chan *network.EventResponseReceived, rawResult *b.RawResult, wg *sync.WaitGroup, ctxt context.Context)

NetworkResponseReceived is the event handler for Network.ResponseReceived events

func PageFrameNavigated

func PageFrameNavigated(eventChan chan *page.EventFrameNavigated, devtoolsState *DTState, wg *sync.WaitGroup, ctxt context.Context)

func PageJavaScriptDialogOpening

func PageJavaScriptDialogOpening(eventChan chan *page.EventJavascriptDialogOpening, wg *sync.WaitGroup, ctxt context.Context, log *logrus.Logger)

PageJavaScriptDialogOpening handles JavaScript dialog events, for now simply dismissing them so data collection can continue

func PageLoadEventFired

func PageLoadEventFired(eventChan chan *page.EventLoadEventFired, loadEventChan chan<- bool, rawResult *b.RawResult, wg *sync.WaitGroup, ctxt context.Context)

PageLoadEventFired is the event handler for the Page.LoadEventFired event

func TargetTargetCreated

func TargetTargetCreated(eventChan chan *target.EventTargetCreated, wg *sync.WaitGroup, ctxt context.Context, Url string)

func VisitPageDevtoolsProtocol

func VisitPageDevtoolsProtocol(tw *b.TaskWrapper) (*b.RawResult, error)

VisitPageDevtoolsProtocol is a high level function that takes a pre-sanitized TaskWrapper and processes it by opening a DevTools Protocol-compatible browser. It produces a RawResult object, and writes relevant results files to disk as specified by the Task in the TaskWrapper.

Types

type DTState

type DTState struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type EventChannels

type EventChannels struct {
	EventSourceMessageReceivedChan chan *network.EventEventSourceMessageReceived
	// contains filtered or unexported fields
}

EventChannels are a wrapper around all of the channels where we will deliver messages from the various events fires by DevTools

Jump to

Keyboard shortcuts

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