Last active
August 19, 2020 23:20
-
-
Save wpajqz/45789f7e99df782cca2cb9a926770a00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
ctx := context.Background() | |
devTools := devtool.New("http://127.0.0.1:9222") | |
pt, err := devTools.Get(ctx, devtool.Page) | |
if err != nil { | |
pt, err = devTools.Create(ctx) | |
if err != nil { | |
panic(err) | |
} | |
} | |
allocCtx, cancel := chromedp.NewRemoteAllocator(context.Background(), pt.WebSocketDebuggerURL) | |
defer cancel() | |
} |
seems to not be working
2020/08/19 23:18:34 invalid context
on line 10
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for showing how to obtain the WebSocketDebuggerURL, I have a question, the devtool package is from https://godoc.org/github.com/mafredri/cdp/devtool right?