Update chromedp to fix console errors (#1521)

This commit is contained in:
peolic
2021-06-23 01:05:58 +03:00
committed by GitHub
parent ae3400a9b1
commit be2fe1de26
526 changed files with 55061 additions and 30300 deletions

View File

@@ -95,7 +95,7 @@ func setCDPCookies(driverOptions scraperDriverOptions) chromedp.Tasks {
for _, ckURL := range driverOptions.Cookies {
for _, cookie := range ckURL.Cookies {
success, err := network.SetCookie(cookie.Name, getCookieValue(cookie)).
err := network.SetCookie(cookie.Name, getCookieValue(cookie)).
WithExpires(&expr).
WithDomain(cookie.Domain).
WithPath(cookie.Path).
@@ -103,12 +103,8 @@ func setCDPCookies(driverOptions scraperDriverOptions) chromedp.Tasks {
WithSecure(false).
Do(ctx)
if err != nil {
return err
return fmt.Errorf("could not set chrome cookie %s: %s", cookie.Name, err)
}
if !success {
return fmt.Errorf("could not set chrome cookie %s", cookie.Name)
}
}
}
return nil