mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-26 05:49:28 +00:00
restored context
This commit is contained in:
parent
5f6a1154df
commit
69d4b39eff
6
wrp.go
6
wrp.go
@ -42,6 +42,8 @@ type Ismap struct {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
version = "3.0"
|
version = "3.0"
|
||||||
|
ctx context.Context
|
||||||
|
cancel context.CancelFunc
|
||||||
gifmap = make(map[string]bytes.Buffer)
|
gifmap = make(map[string]bytes.Buffer)
|
||||||
ismap = make(map[string][]Ismap)
|
ismap = make(map[string][]Ismap)
|
||||||
)
|
)
|
||||||
@ -269,9 +271,9 @@ func main() {
|
|||||||
actx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
|
actx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
if debug {
|
if debug {
|
||||||
ctx, cancel := chromedp.NewContext(actx, chromedp.WithDebugf(log.Printf))
|
ctx, cancel = chromedp.NewContext(actx, chromedp.WithDebugf(log.Printf))
|
||||||
} else {
|
} else {
|
||||||
ctx, cancel := chromedp.NewContext(actx)
|
ctx, cancel = chromedp.NewContext(actx)
|
||||||
}
|
}
|
||||||
defer cancel()
|
defer cancel()
|
||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
|
Loading…
Reference in New Issue
Block a user