parent
17881510a4
commit
4d2269b799
|
@ -5,3 +5,4 @@
|
|||
*.log
|
||||
/config/config.yml
|
||||
/chromium-857950/
|
||||
/web/
|
||||
|
|
|
@ -39,6 +39,7 @@ type Config struct {
|
|||
Cron string `json:"cron" yaml:"cron"`
|
||||
EdgePath string `json:"edge_path" yaml:"edge_path"`
|
||||
QrCOde bool `json:"qr_code" yaml:"qr_code"`
|
||||
StartWait int `json:"start_wait" yaml:"start_wait"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
@ -43,3 +43,12 @@ tg:
|
|||
# "9 19 * * *" 每天19点9分执行一次
|
||||
# "* 10 * * *” 每天早上十点执行一次
|
||||
cron: ""
|
||||
|
||||
#windows环境自定义浏览器路径,仅支持chromium系列
|
||||
edge_path: ""
|
||||
|
||||
# 是否推送二维码
|
||||
qr_code: false
|
||||
|
||||
# 启动时等待时间,为了防止代理启动比软件慢而报错,默认不等待,单位秒
|
||||
start_wait: 0
|
|
@ -231,7 +231,7 @@ func (c *Core) initWondows() {
|
|||
Channel: nil,
|
||||
ChromiumSandbox: nil,
|
||||
Devtools: nil,
|
||||
DownloadsPath: nil,
|
||||
DownloadsPath: playwright.String("./tools/temp/"),
|
||||
ExecutablePath: playwright.String(path),
|
||||
HandleSIGHUP: nil,
|
||||
HandleSIGINT: nil,
|
||||
|
@ -250,7 +250,8 @@ func (c *Core) initWondows() {
|
|||
c.browser = browser
|
||||
|
||||
context, err := c.browser.NewContext()
|
||||
c.browser.NewContext()
|
||||
_ = context.AddInitScript(playwright.BrowserContextAddInitScriptOptions{
|
||||
Script: playwright.String("Object.defineProperties(navigator, {webdriver:{get:()=>undefined}});")})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -313,9 +314,9 @@ func (c *Core) initNotWindows() {
|
|||
return
|
||||
}
|
||||
c.browser = browser
|
||||
|
||||
context, err := c.browser.NewContext()
|
||||
c.browser.NewContext()
|
||||
_ = context.AddInitScript(playwright.BrowserContextAddInitScriptOptions{
|
||||
Script: playwright.String("Object.defineProperties(navigator, {webdriver:{get:()=>undefined}});")})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue