This commit is contained in:
Antoni Sawicki 2022-11-06 01:38:31 -08:00
parent 9cd286add8
commit c4d9833707

2
wrp.go
View File

@ -266,7 +266,7 @@ func (rq *wrpReq) capture() {
} }
chromedp.Run( chromedp.Run(
ctx, emulation.SetDeviceMetricsOverride(int64(float64(rq.width)/rq.zoom), height, rq.zoom, false), ctx, emulation.SetDeviceMetricsOverride(int64(float64(rq.width)/rq.zoom), height, rq.zoom, false),
chromedp.Sleep(time.Second*2), chromedp.Sleep(time.Second*2), // TODO(tenox): totally lame, find a better way to determine if page is rendered
) )
// Capture screenshot... // Capture screenshot...
err = chromedp.Run(ctx, chromedpCaptureScreenshot(&pngcap, rq.height)) err = chromedp.Run(ctx, chromedpCaptureScreenshot(&pngcap, rq.height))