This commit is contained in:
Antoni Sawicki 2022-11-06 01:38:31 -08:00
parent 9cd286add8
commit c4d9833707
1 changed files with 1 additions and 1 deletions

2
wrp.go
View File

@ -266,7 +266,7 @@ func (rq *wrpReq) capture() {
}
chromedp.Run(
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...
err = chromedp.Run(ctx, chromedpCaptureScreenshot(&pngcap, rq.height))