fix(deps): migrate to chromedp 0.19 and drop the cdproto replace

Update chromedp to v0.19.1 and cdproto to v0.157.4, port the browser, reader and login code to the generic Action API, group both modules in Renovate, and move the Docker build to Go 1.27.
This commit is contained in:
2026-10-05 10:32:22 +01:00
parent 5d945156ba
commit 956aa3c0cb
9 changed files with 67 additions and 91 deletions
+3 -5
View File
@@ -66,7 +66,7 @@ func (b *Browser) ensureAllocator() (context.Context, error) {
b.allocCtx, b.allocCancel = chromedp.NewExecAllocator(context.Background(), opts...)
browserCtx, cancel := chromedp.NewContext(b.allocCtx)
if err := chromedp.Run(browserCtx, chromedp.Navigate("about:blank")); err != nil {
if err := chromedp.Do(browserCtx, chromedp.Navigate("about:blank")); err != nil {
b.startErr = fmt.Errorf("warm up browser: %w", err)
cancel()
return
@@ -144,10 +144,8 @@ func (b *Browser) NewContext(parentCtx context.Context, statePath string) (conte
// the first step of a fresh login (otherwise stale session cookies from
// a previous attempt can mask the new login's success).
func ClearAllCookies(ctx context.Context) error {
return chromedp.Run(ctx, chromedp.ActionFunc(func(ctx context.Context) error {
target := chromedp.FromContext(ctx).Target
return network.ClearBrowserCookies().Do(cdp.WithExecutor(ctx, target))
}))
_, err := chromedp.Call(ctx, network.ClearBrowserCookies, cdp.Empty{})
return err
}
// NewHeadedContext spawns a *separate* Chromium process with a visible