qjfoidnh / BaiduPCS-Go

iikira/BaiduPCS-Go原版基础上集成了分享链接/秒传链接转存功能
Apache License 2.0
2.9k stars 440 forks source link

在github action中使用cookie登录报错 #297

Closed poweryu closed 11 months ago

poweryu commented 12 months ago
panic: runtime error: index out of range [1] with length 0

goroutine 1 [running]:
github.com/qjfoidnh/BaiduPCS-Go/internal/pcsconfig.(*PCSConfig).SetupUserByBDUSS(0xc0000cb540, {0x0, 0x7}, {0x0, 0x0}, {0x0, 0x0}, {0x7ffc79436755, 0xc0000cb540})
    /home/liu/Projects/BaiduPCS-Go/internal/pcsconfig/maniper.go:122 +0x3cb
main.main.func5(0xc0000db4a0)
    /home/liu/Projects/BaiduPCS-Go/main.go:441 +0x277
github.com/urfave/cli.HandleAction({0x930560, 0xa14518}, 0x5)
    /home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524 +0xa8
github.com/urfave/cli.Command.Run({{0x9e2e3c, 0x5}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0x9ed427, 0x12}, {0x0, ...}, ...}, ...)
    /home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173 +0x652
github.com/urfave/cli.(*App).Run(0xc0001248c0, {0xc0000bc000, 0x17, 0x18})
    /home/liu/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277 +0x705
main.main()
    /home/liu/Projects/BaiduPCS-Go/main.go:2234 +0x64a5
qjfoidnh commented 12 months ago

可以注意下cookie里是否含有 BDUSS=xxxxxxx; 字样,看报错是未匹配到

poweryu commented 12 months ago

改用stoken可以登录了,谢谢