Skip to content

Commit 9be19bd

Browse files
committed
run chrome headless
1 parent 884270f commit 9be19bd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/app/browser.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import (
1111
)
1212

1313
func DownloadCsv(config *Config, startDate string, endDate string) (string, error) {
14-
allocatorFlags := append(chromedp.DefaultExecAllocatorOptions[:], chromedp.Flag("headless", false))
15-
ctx, cancel := chromedp.NewExecAllocator(context.Background(), allocatorFlags...)
16-
defer cancel()
17-
ctx, cancel = chromedp.NewContext(ctx, chromedp.WithLogf(log.Printf))
14+
ctx, cancel := chromedp.NewContext(context.Background(), chromedp.WithLogf(log.Printf))
1815
defer cancel()
1916
ctx, cancel = context.WithTimeout(ctx, 30*time.Second)
2017
defer cancel()

0 commit comments

Comments
 (0)