|
|
@@ -79,7 +79,7 @@ func (self *ToolController) GetHaibaoWithGoogle() {
|
|
|
var buf []byte
|
|
|
err = chromedp.Run(ctx,
|
|
|
//chromedp.Sleep(10*time.Second),
|
|
|
- //chromedp.EmulateViewport(1400, 800), // 设置视口宽度为 1400,高度为 800
|
|
|
+ chromedp.EmulateViewport(1400, 800), // 设置视口宽度为 1400,高度为 800
|
|
|
chromedp.Navigate(decodedUri), // 替换为你想截图的网页地址
|
|
|
chromedp.WaitReady("body", chromedp.ByQuery), // 等待页面的 <body> 元素加载完成
|
|
|
chromedp.FullScreenshot(&buf, 90), // 调整质量参数
|