chromedptool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChromedpConnParam

type ChromedpConnParam struct {
	Description          string
	DevtoolsFrontendUrl  string
	Id                   string
	Title                string
	Type                 string
	Url                  string
	WebSocketDebuggerUrl string
}

"description": "", "devtoolsFrontendUrl": "/devtools/inspector.html?ws=localhost:9222/devtools/page/E8CB7F8AAB1FF9ECB2D76C5363C6FE7A", "id": "E8CB7F8AAB1FF9ECB2D76C5363C6FE7A", "title": "about:blank", "type": "page", "url": "about:blank", "webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/E8CB7F8AAB1FF9ECB2D76C5363C6FE7A" curl http://localhost:9222/json,we can get output like this which contain the info for connecting chromedp

type ChromedpHandler

type ChromedpHandler struct {
}

func (ChromedpHandler) GenPdf

func (c ChromedpHandler) GenPdf(printUrl, outputPdfFilePath string) error

*

  • @description: generate pdf file by chromedp
  • @param {*} printUrl : url to print
  • @param {string} outputPdfFilePath : output pdf file path
  • @return {*}

func (ChromedpHandler) GetConnUrl

func (c ChromedpHandler) GetConnUrl(urls ...string) (*ChromedpConnParam, error)

*

  • @description: get connection info from chromedp
  • @param {...string} urls chromdp service url,default using http://localhost:9222/json
  • @return {*}

Jump to

Keyboard shortcuts

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