From c036841c0aea7a16557a23123c0ae5e463166135 Mon Sep 17 00:00:00 2001 From: Antoni Sawicki Date: Tue, 27 Oct 2020 04:39:14 -0700 Subject: [PATCH] revert sleep setting --- wrp.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wrp.go b/wrp.go index 4f5d2cb..5444ab7 100644 --- a/wrp.go +++ b/wrp.go @@ -305,7 +305,6 @@ func (w wrpReq) capture() { var pngcap []byte chromedp.Run(ctx, emulation.SetDeviceMetricsOverride(int64(float64(w.width)/w.scale), 10, w.scale, false), - chromedp.Sleep(time.Second*1), chromedp.Location(&w.url), chromedp.ComputedStyle("body", &styles, chromedp.ByQuery), chromedp.ActionFunc(func(ctx context.Context) error { @@ -329,7 +328,7 @@ func (w wrpReq) capture() { chromedp.Run(ctx, emulation.SetDeviceMetricsOverride(int64(float64(w.width)/w.scale), height, w.scale, false)) // Capture screenshot... err = chromedp.Run(ctx, - chromedp.Sleep(time.Second*1), + chromedp.Sleep(time.Second*2), chromedp.CaptureScreenshot(&pngcap), ) if err != nil {