最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何使用 chromedp 進(jìn)行代理

如何使用 chromedp 進(jìn)行代理

Go
偶然的你 2023-07-10 17:25:47
我想截取亞馬遜等網(wǎng)站(數(shù)千頁(yè))的屏幕截圖。我嘗試了一些代碼,但在屏幕截圖中出現(xiàn)了驗(yàn)證碼或流量錯(cuò)誤。所以我想用 chromedp 添加代理。ctx, cancel := chromedp.NewContext(context.Background())defer cancel()chromedp.ProxyServer("http://username:password@proxyserver.com:31280")chromedp.Run(ctx,        chromedp.Navigate("http://wtfismyip.com"),        chromedp.Sleep(3*time.Second),        chromedp.ActionFunc(func(ctxt context.Context) error {            _, _, contentRect, err := page.GetLayoutMetrics().Do(ctxt)            v := page.Viewport{                X:      contentRect.X,                Y:      contentRect.Y,                Width:  contentRect.Width,                Height: contentRect.Height,                Scale:  1,            }            buf, err := page.CaptureScreenshot().WithClip(&v).Do(ctxt)            log.Printf("Write %v", "/tmp/ss.png")            ioutil.WriteFile("/tmp/ss.png", buf, 0644)            return err        }))也嘗試過(guò)這個(gè),但不起作用。
查看完整描述

1 回答

?
慕容708150

TA貢獻(xiàn)1831條經(jīng)驗(yàn) 獲得超4個(gè)贊

o := append(chromedp.DefaultExecAllocatorOptions[:],

? //... any options here

? chromedp.ProxyServer("http://username:password@proxyserver.com:31280"),?

)


查看完整回答
反對(duì) 回復(fù) 2023-07-10
  • 1 回答
  • 0 關(guān)注
  • 511 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)