更新时间:2023-01-15 21:30:58
尝试一下:
o := append(chromedp.DefaultExecAllocatorOptions[:],
//... any options here
chromedp.ProxyServer("http://username:password@proxyserver.com:31280"),
)
cx, cancel := chromedp.NewExecAllocator(context.Background(), o...)
defer cancel()
ctx, cancel := chromedp.NewContext(cx)
defer cancel()
//... the rest of your code