Git Product home page Git Product logo

Comments (5)

CuteReimu avatar CuteReimu commented on August 28, 2024 1

这个可以: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#用户名片信息

from substats.

spencerwooo avatar spencerwooo commented on August 28, 2024

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

from substats.

CuteReimu avatar CuteReimu commented on August 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站拦截了。

from substats.

CuteReimu avatar CuteReimu commented on August 28, 2024

我就先改成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'

期待大佬解决。

from substats.

Achuan-2 avatar Achuan-2 commented on August 28, 2024

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

from substats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.