format fixes

This commit is contained in:
Antoni Sawicki 2024-06-19 00:35:12 -07:00
parent 6ffdf1fd7f
commit 19f4be3ac1

4
wrp.go
View File

@ -38,8 +38,8 @@ import (
"github.com/MaxHalford/halfgone" "github.com/MaxHalford/halfgone"
"github.com/chromedp/cdproto/css" "github.com/chromedp/cdproto/css"
"github.com/chromedp/cdproto/emulation" "github.com/chromedp/cdproto/emulation"
"github.com/chromedp/cdproto/page"
"github.com/chromedp/cdproto/input" "github.com/chromedp/cdproto/input"
"github.com/chromedp/cdproto/page"
"github.com/chromedp/chromedp" "github.com/chromedp/chromedp"
"github.com/soniakeys/quant/median" "github.com/soniakeys/quant/median"
) )
@ -323,12 +323,12 @@ func (rq *wrpReq) capture() {
return nil return nil
}), }),
) )
log.Printf("%s Landed on: %s, Height: %v\n", rq.r.RemoteAddr, rq.url, h)
for _, style := range styles { for _, style := range styles {
if style.Name == "background-color" { if style.Name == "background-color" {
fmt.Sscanf(style.Value, "rgb(%d,%d,%d)", &r, &g, &b) fmt.Sscanf(style.Value, "rgb(%d,%d,%d)", &r, &g, &b)
} }
} }
log.Printf("%s Landed on: %s, Height: %v\n", rq.r.RemoteAddr, rq.url, h)
height := int64(float64(rq.height) / rq.zoom) height := int64(float64(rq.height) / rq.zoom)
if rq.height == 0 && h > 0 { if rq.height == 0 && h > 0 {
height = h + 30 height = h + 30