This commit is contained in:
parent
ae4dd4bf63
commit
d63d345a9b
1 changed files with 4 additions and 1 deletions
|
|
@ -301,7 +301,10 @@ func (s *MandarakeParser) initClient2() error {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
ctx, _ = chromedp.NewContext(ctx)
|
allocCtx, allocCancel := chromedp.NewRemoteAllocator(ctx, "ws://headless-shell:9222")
|
||||||
|
defer allocCancel()
|
||||||
|
|
||||||
|
ctx, _ = chromedp.NewContext(allocCtx)
|
||||||
|
|
||||||
if err := chromedp.Run(ctx,
|
if err := chromedp.Run(ctx,
|
||||||
chromedp.Navigate(s.parseParams.cookieUrl),
|
chromedp.Navigate(s.parseParams.cookieUrl),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue