Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B站接口好像突然跪了 #62

Open
CuteReimu opened this issue Apr 27, 2024 · 6 comments
Open

B站接口好像突然跪了 #62

CuteReimu opened this issue Apr 27, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@CuteReimu
Copy link

Describe the bug
现在获取不到B站相关信息了

To Reproduce

$ curl "https://api.swo.moe/stats/bilibili/1415334"
{"source":"bilibili","key":"1415334","failed":true,"message":"request was banned"}

$ curl "https://api.spencerwoo.com/substats/?source=bilibili&queryKey=1415334"
{"status":200,"data":{"totalSubs":0,"subsInEachSource":{"bilibili":0},"failedSources":{"bilibili":"Bilibili user not found"}}}

Expected behavior
原本是可以返回正确信息的

Additional context
之前还是好的,这两天突然就这样了,导致shields.io引用的B站数据全失效了

@CuteReimu CuteReimu added the bug Something isn't working label Apr 27, 2024
@spencerwooo
Copy link
Owner

B 站有其他接口可供使用吗?

@CuteReimu
Copy link
Author

CuteReimu commented Apr 27, 2024

这个可以:https://api.bilibili.com/x/web-interface/card?mid=1415334

返回:

{
  "code": 0,
  "message": "0",
  "ttl": 1,
  "data": {
    "card": {
      //...
      "fans": 12345,
      //...
    }
  }
}

api文档:https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/user/info.md#用户名片信息

@CuteReimu
Copy link
Author

CuteReimu commented Apr 28, 2024

测了一下,好像不是B站的原因,原接口是好的。

$ curl "https://api.bilibili.com/x/relation/stat?vmid=1415334"
{"code":0,"message":"0","ttl":1,"data":{"mid":1415334,"following":157,"whisper":0,"black":0,"follower":1280}}

也不像是request head少了什么东西导致的,因为我本地npm run dev测试也是好的:

$ curl "http://127.0.0.1:8787/stats/bilibili/1415334"
{"source":"bilibili","key":"1415334","failed":false,"count":1280}

感觉倒像是你那边被B站拦截了。

@CuteReimu
Copy link
Author

我就先改成B站原生接口用了。

curl -G 'https://img.shields.io/badge/dynamic/json' \
--data-urlencode 'url=https://api.bilibili.com/x/relation/stat?vmid=1415334' \
--data-urlencode 'query=$.data.follower'

期待大佬解决。

@Achuan-2
Copy link

Clip_2024-05-13_22-12-55
我这边也不行

@Guest-Liang
Copy link

Guest-Liang commented Oct 29, 2024

昨晚写代码还是显示no result,今天一打开GitHub发现有数据了(
不懂是改回去了还是怎么的
10.31 Edit: 又跪了(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants