|
|
@@ -78,11 +78,11 @@ func (self *ToolController) GetHaibaoWithGoogle() {
|
|
|
// 运行任务(导航到网页,并捕获屏幕截图)
|
|
|
var buf []byte
|
|
|
err = chromedp.Run(ctx,
|
|
|
- //chromedp.Sleep(10*time.Second),
|
|
|
chromedp.EmulateViewport(1400, 800), // 设置视口宽度为 1400,高度为 800
|
|
|
chromedp.Navigate(decodedUri), // 替换为你想截图的网页地址
|
|
|
//chromedp.WaitReady("body", chromedp.ByQuery), // 等待页面的 <body> 元素加载完成
|
|
|
chromedp.WaitReady("#overload", chromedp.ByID),
|
|
|
+ chromedp.Sleep(5*time.Second),
|
|
|
chromedp.FullScreenshot(&buf, 90), // 调整质量参数
|
|
|
)
|
|
|
if err != nil {
|