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 {*}
Click to show internal directories.
Click to hide internal directories.