mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-24 07:30:58 +00:00
format fixes
This commit is contained in:
parent
6ffdf1fd7f
commit
19f4be3ac1
4
wrp.go
4
wrp.go
@ -38,8 +38,8 @@ import (
|
||||
"github.com/MaxHalford/halfgone"
|
||||
"github.com/chromedp/cdproto/css"
|
||||
"github.com/chromedp/cdproto/emulation"
|
||||
"github.com/chromedp/cdproto/page"
|
||||
"github.com/chromedp/cdproto/input"
|
||||
"github.com/chromedp/cdproto/page"
|
||||
"github.com/chromedp/chromedp"
|
||||
"github.com/soniakeys/quant/median"
|
||||
)
|
||||
@ -323,12 +323,12 @@ func (rq *wrpReq) capture() {
|
||||
return nil
|
||||
}),
|
||||
)
|
||||
log.Printf("%s Landed on: %s, Height: %v\n", rq.r.RemoteAddr, rq.url, h)
|
||||
for _, style := range styles {
|
||||
if style.Name == "background-color" {
|
||||
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)
|
||||
if rq.height == 0 && h > 0 {
|
||||
height = h + 30
|
||||
|
Loading…
Reference in New Issue
Block a user