|
@@ -13,8 +13,6 @@ import (
|
|
|
|
|
|
"github.com/chromedp/cdproto/fetch"
|
|
|
|
|
|
- "github.com/chromedp/cdproto/page"
|
|
|
-
|
|
|
"github.com/chromedp/chromedp"
|
|
|
)
|
|
|
|
|
@@ -149,10 +147,10 @@ func NewBrowser(headless bool, showImage bool, proxyServe bool, baseUrl string,
|
|
|
//
|
|
|
chromedp.Run(incCtx,
|
|
|
fetch.Enable(),
|
|
|
- chromedp.ActionFunc(func(cxt context.Context) error {
|
|
|
- _, err := page.AddScriptToEvaluateOnNewDocument("Object.defineProperty(navigator, 'webdriver', { get: () => false, });").Do(cxt)
|
|
|
- return err
|
|
|
- }),
|
|
|
+ //chromedp.ActionFunc(func(cxt context.Context) error {
|
|
|
+ // _, err := page.AddScriptToEvaluateOnNewDocument("Object.defineProperty(navigator, 'webdriver', { get: () => false, });").Do(cxt)
|
|
|
+ // return err
|
|
|
+ //}),
|
|
|
)
|
|
|
return ctx, cancelFn, allocCtx, allocCancelFn, incCtx, incCancelFn
|
|
|
}
|