feat: 添加 Chrome 浏览器支持和安装说明折叠 (#67)

* feat: 添加 Chrome 浏览器支持和安装说明折叠

- 支持 Chrome 浏览器作为备选方案
- README 安装部分使用 details 标签折叠
- 优化浏览器配置和初始化逻辑

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: 更新 README.md 以包含 Windows 问题和登录部分说明

- 添加 Windows 问题的链接以供参考
- 更新 README 中的登录部分内容

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
zy
2025-09-14 17:49:19 +08:00
committed by GitHub
parent 47aba20735
commit e4745d28d4
8 changed files with 92 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"context"
"encoding/json"
"flag"
"github.com/go-rod/rod"
"github.com/sirupsen/logrus"
@@ -12,9 +13,14 @@ import (
)
func main() {
var (
binPath string // 浏览器二进制文件路径
)
flag.StringVar(&binPath, "bin", "", "浏览器二进制文件路径")
flag.Parse()
// 登录的时候,需要界面,所以不能无头模式
b := browser.NewBrowser(false)
b := browser.NewBrowser(false, browser.WithBinPath(binPath))
defer b.Close()
page := b.NewPage()