Closed zouxingyuks closed 10 months ago
报错信息来自服务端(https://github.com/microsoft/playwright ),与 playwright-go 客户端无关。 (The error message comes from the server (https://github.com/microsoft/playwright) and has nothing to do with the playwright-go client.)
如果只是想配置代理,用如下参数直接配置: (If you just want to configure the proxy, configure it directly with the following parameters: )
browser, err := pw.Firefox.Launch(playwright.BrowserTypeLaunchOptions{
Proxy: &playwright.Proxy{
Server: playwright.String("http://127.0.0.1:8080"),
},
})
如果要配置 PAC 地址或其它选项,先自己在firefox里配置好,然后在浏览器的 about:config
界面勾选仅显示修改过的首选项查看实际保存在哪个配置项,以及对应的类型是 string/number/boolean 哪一种。
(If you want to configure the PAC URL or other options, first configure them in firefox, and then check Only display modified preferences in the about:config
interface of the browser to see which configuration item is actually saved. )
firefox 中的 FirefoxUserPrefs 如果使用的 network.proxy.http_port 对应的interface是 string 会报错,但报错信息十分令人迷惑 复现代码