获取视频基础信息:

https://api.bilibili.com/x/web-interface/view?bvid=BV1Rg4y187Fh

响应(省略部分内容):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
    "code": 0,
    "message": "0",
    "ttl": 1,
    "data": {
        "bvid": "BV1Rg4y187Fh",
        "aid": 837810625,
        "videos": 1,
        "pic": "http://i0.hdslb.com/bfs/archive/fe61dd3c755ffbc90a10e131f142d8f3f71d5a54.jpg",
        "title": "【下 山】周 某 出 狱",
        "pubdate": 1587204023,
        "ctime": 1587101439,
        "desc": "周某出狱,颤抖吧,电瓶!",
        "state": 0,
        "stat": {
            "aid": 837810625,
            "view": 1272096,
            "share": 15598,
            "now_rank": 0,
            "his_rank": 0,
            "like": 95764,
            "dislike": 0,
            "evaluation": ""
        },
        "cid": 179554371,
        "dimension": {
            "width": 1920,
            "height": 1080,
            "rotate": 0
        },
        "no_cache": false,
        "pages": [
            {
                "cid": 179554371,
                "page": 1,
                "from": "vupload",
                "part": "【下 山】周 某 出 狱 v003",
                "duration": 122,
                "vid": "",
                "weblink": "",
                "dimension": {
                    "width": 1920,
                    "height": 1080,
                    "rotate": 0
                }
            }
        ],
        "subtitle": {
            "allow_submit": false,
            "list": []
        },
        "label": {
            "type": 1
        }
    }
}

获取下载地址:

https://api.bilibili.com/x/player/playurl?bvid=BV1Rg4y187Fh&cid=179554371&qn=64&type=&otype=json

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
    "code": 0,
    "message": "0",
    "ttl": 1,
    "data": {
        "from": "local",
        "result": "suee",
        "message": "",
        "quality": 32,
        "format": "flv480",
        "timelength": 121336,
        "accept_format": "hdflv2,flv,flv720,flv480,mp4",
        "accept_description": [
            "高清 1080P+",
            "高清 1080P",
            "高清 720P",
            "清晰 480P",
            "流畅 360P"
        ],
        "accept_quality": [
            112,
            80,
            64,
            32,
            16
        ],
        "video_codecid": 7,
        "seek_param": "start",
        "seek_type": "offset",
        "durl": [
            {
                "order": 1,
                "length": 121336,
                "size": 15369110,
                "ahead": "",
                "vhead": "",
                "url": "http://cn-zjnb-cmcc-v-06.bilivideo.com/upgcxcode/71/43/179554371/179554371-1-32.flv?expires=1587391200&platform=pc&ssig=Z0V0VXGhko-gYjg0H6tbSQ&oi=664967545&trid=92334cc112cd4b268906358e53fbba28u&nfc=1&nfb=maPYqpoel5MI3qOUX6YpRA==&mid=0&logo=80000000",
                "backup_url": [
                    "http://cn-ahhn-cmcc-v-04.bilivideo.com/upgcxcode/71/43/179554371/179554371-1-32.flv?expires=1587391200&platform=pc&ssig=Z0V0VXGhko-gYjg0H6tbSQ&oi=664967545&trid=92334cc112cd4b268906358e53fbba28u&nfc=1&nfb=maPYqpoel5MI3qOUX6YpRA==&mid=0&logo=40000000",
                    "http://upos-sz-mirrorkodo.bilivideo.com/upgcxcode/71/43/179554371/179554371-1-32.flv?e=ig8euxZM2rNcNbh17WdVhoMzhWUVhwdEto8g5X10ugNcXBlqNxHxNEVE5XREto8KqJZHUa6m5J0SqE85tZvEuENvNo8g2ENvNo8i8o859r1qXg8xNEVE5XREto8GuFGv2U7SuxI72X6fTr859r1qXg8gNEVE5XREto8z5JZC2X2gkX5L5F1eTX1jkXlsTXHeux_f2o859IB_&uipk=5&nbs=1&deadline=1587391239&gen=playurl&os=kodobv&oi=664967545&trid=92334cc112cd4b268906358e53fbba28u&platform=pc&upsig=542a1a075c0a382dbdff1ad09470f51d&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,platform&mid=0&logo=40000000"
                ]
            }
        ]
    }
}

清晰度说明

说明
1121080P+
801080P
64720P
32480P
16360P