Skip to content

Commit

Permalink
更新GetUserVideos接口
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Nov 3, 2023
1 parent 673cc13 commit 0d913b9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ PS:目前,B站调用接口时强制使用 `https` 协议

`由于B站最近对所有搜索类接口都加上了Wbi签名认证的风控策略,本项目还没有对其进行兼容,因此这些搜索类接口可能会返回“-403:非法访问”的错误。`

`不过,GetUserVideos接口好像又可以在不使用Wbi签名的情况下用了。`~~本着代码能跑就不要乱动它的原则,因此就没管。~~

本项目的注释不会太多,使用时建议对照着 [SocialSisterYi/bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 的文档查看。

本项目预计不会编写单元测试代码。一则因为各项数据会频繁变动,难以写成固定的结果;二则因为每次单元测试都要大量请求B站API,会对其产生不必要的压力。
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (

require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
golang.org/x/net v0.17.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
Expand Down
2 changes: 1 addition & 1 deletion user.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (c *Client) GetUserVideos(mid int, order OrderType, tid int, keyword string
if len(keyword) > 0 {
postData["keyword"] = keyword
}
resp, err := c.resty().R().SetQueryParams(postData).Get("https://api.bilibili.com/x/space/arc/search")
resp, err := c.resty().R().SetQueryParams(postData).Get("https://api.bilibili.com/x/space/wbi/arc/search")
if err != nil {
return nil, errors.WithStack(err)
}
Expand Down

0 comments on commit 0d913b9

Please sign in to comment.