SocialSisterYi / bilibili-API-collect

哔哩哔哩-API收集整理【不断更新中....】
https://socialsisteryi.github.io/bilibili-API-collect/
Other
15.27k stars 1.73k forks source link

grpc api DynDetails报错 #757

Open Polyisoprene opened 1 year ago

Polyisoprene commented 1 year ago

报错service所在的文件

bilibili/app/dynamic/v2/dynamic.proto

报错的service

DynDetails

报错详情

DynDetails报错

<AioRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "-400"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-07-24T22:43:40.820097506+08:00", grpc_status:2, grpc_message:"-400"}"
>

python 版本:3.10 os: 22.04.1-Ubuntu x86_64

bilibili-API-collect 版本:2023.7.24从github下载的最新版本

cxw620 commented 1 year ago

经反编译检查, 没发现相关 proto message 有错误.

cxw620 commented 1 year ago

我使用 Rust 测试通过, 应该是你代码问题.

测试用例 ```rust DynDetailReq { uid: *, dynamic_id: "821864055362813958".to_owned(), dyn_type: -1, player_args: Some(bapis::app::archive::middleware::v1::PlayerArgs { qn: 127, fnver: 0, fnval: 464, force_host: 2, voice_balance: 0, }), share_id: "dt.dt-detail.0.0.pv".to_owned(), share_mode: 3, local_time: 8, ..Default::default() }; ``` Test Result: test mods::middleware::cache::test::test_dyn_detail_req ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 13 filtered out; finished in 0.62s
cxw620 commented 1 year ago

至于 DynDetails, 你的错误信息没解析出来, 我测试也报了 -400, 拿到的错误信息是 Status { code: -400, message: "请求错误", details: [] }, 由于我没找到测试用例, 我也不知道为什么报 -400, 但绝对不是 proto 出错.

附上错误的 Req:

DynDetailsReq {
    dynamic_ids: "821864055362813958".to_owned(),
    player_args: Some(bapis::app::archive::middleware::v1::PlayerArgs {
        qn: 127,
        fnver: 0,
        fnval: 464,
        force_host: 2,
        voice_balance: 0,
    }),
    local_time: 8,
    playurl_param: Some(bapis::app::dynamic::v2::PlayurlParam {
        qn: 127,
        fnver: 0,
        fnval: 464,
        force_host: 2,
        fourk: 1,
    }),
    ..Default::default()
};

简单看了看, dynamic_ids 不是 dynamic_id 的组合, 估计是这里出问题

Polyisoprene commented 1 year ago

以前是能用的,dynamic_ids就是形如"821864055362813958,821864055362813958"这样用逗号分隔的动态id的字符串,但是后边不知怎么的就开始报错了

cxw620 commented 1 year ago

可能是接口关掉了吧? 我扒了好久都没发现 app 有请求这个接口

Polyisoprene commented 1 year ago

可能是接口关掉了吧? 我扒了好久都没发现 app 有请求这个接口 这个应该是用于折叠动态的,以前的折叠动态的动态类型是fold,然后里边有一个值是dynamic_ids,就是几个被折叠到一起的动态的动态id,这个接口应该是点击折叠动态加载动态内容用的