哔哩哔哩视频解析
Posted qyvlik
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了哔哩哔哩视频解析相关的知识,希望对你有一定的参考价值。
哔哩哔哩真实视频地址解析
2015/9/25
经过测试,发现,哔哩哔哩现有的视频源极为混乱。既有自己的本站的视频源,也有乐视云的视频源。
http://interface.bilibili.com/playurl?cid=4553209&player=1&ts=1443111069&sign=c56a3aee9efa4d99e6021c7dcca345b8
。
通过 cid 来获取 xml 格式的内容
<?xml version="1.0" encoding="UTF-8"?>
<video>
<result>suee</result>
<timelength>73000</timelength>
<format><![CDATA[flv]]></format>
<accept_format><![CDATA[flv]]></accept_format>
<accept_quality><![CDATA[3]]></accept_quality>
<from><![CDATA[local]]></from>
<seek_param><![CDATA[start]]></seek_param>
<seek_type><![CDATA[offset]]></seek_type>
<src>0</src>
<durl>
<order>1</order>
<length>73000</length>
<size>15922656</size>
<url><![CDATA[http://cn-hbyc8-dx.acgvideo.com/vg5/b/42/4553209-1.flv?expires=1443139800&ssig=oa7MZaFhBBVAMu_0QnepZQ&o=3395853763&player=1&rate=0]]></url>
<backup_url>
<url><![CDATA[http://cn-gdzh5-dx.acgvideo.com/vg3/8/06/4553209-1.flv?expires=1443139800&ssig=HR-Nj_NpJj7b-4vURM6dFw&o=3395853763&player=1&rate=0]]></url>
<url><![CDATA[http://cn-jxjdz3-dx.acgvideo.com/vg6/0/8d/4553209-1.flv?expires=1443139800&ssig=OGO5U17exdfLAeP7l6yfTw&o=3395853763&player=1&rate=0]]></url>
</backup_url>
</durl>
</video>
也有乐视云的视频源。
http://g3.letv.cn/vod/v2/MTYxLzQzLzExMi9iY2xvdWQvMTAwMTcyLzEwMDE0NDg4NDEtYXZjLTU1NTAwNTktYWFjLTEyNTY4Ni0yMjAwMjEtMTYwMTc0MjEzLTUxMGJjZWFiYTQ3ZjU5NzM3YTI3NzI2OWMzMDE2ZWU5LTE0NDI4NTA3MTYzNzEuZmx2?b=5823&mmsid=35201158&tm=1443109874&key=2c431f1d04a4a9e64c1ecb781c8846ba&platid=2&splatid=203&playid=0&tss=no&vtype=27&cvid=1593626887510&payff=0&pip=38ca532d7001e8834d007028117a0941&tag=flash&sign=bcloud_100172&termid=1&pay=0&ostype=windows&hwtype=un&format=1&hwtype=un&ostype=Windows7&tag=bcloud&sign=bcloud_100172&ch=bcloud_100172&expect=3&tn=0.7492179414257407&uuid=FC0135E5434A678BB0B29CBE3265986783B3871B_1&p1=3&p2=30&p3=300&vid=15897364&rateid=yuanhua
"status": 200,
"ercode": 0,
"ipint": "3395853763",
"remote": "202.104.157.195",
"host": "202.104.157.195",
"ipstart": "202.104.153.0",
"ipend": "202.104.159.255",
"geo": "CN.19.263.1",
"desc": "中国-广东省-中山市-电信",
"country": "CN",
"gone": 1010,
"buss": "bussid=59002,alv=80,qos=5,host=2,port=80",
"level": 100,
"usep2p": 1,
"flag": "0",
"pool": "GD-ST-CTC2",
"detail": "ratiofix:1010/829,1012,834,1021,1021,1061,1061,1061,2000,879,879,1032,1032,1054,1054,1054,1010,1010,1022",
"playlevel": 2,
"slicetime": 480,
"leavetime": 90,
"expect": 3,
"actual": 3,
"needtest": 0,
"curtime": 1443110172,
"starttime": 0,
"endtime": 0,
"cliptime": 6,
"timeshift": 168,
"dir": "",
"cdnpath": "",
"livep2p": 1,
"mustm3u8": 0,
"livesftime": 60,
"livesfmust": 0,
"maxsftime": 200,
"maxslicesize": 60,
"forcegslb": 7200,
"updatecdn": 7200,
"privrange": 0,
"openrange": 1,
"downpolicy": 2,
"identify": "1780933325",
"location": "http://125.91.9.75/161/43/112/bcloud/100172/1001448841-avc-5550059-aac-125686-220021-160174213-510bceaba47f59737a277269c3016ee9-1442850716371.letv?crypt=66aa7f2e582300&b=5823&nlh=3072&nlt=45&bf=8000&p2p=1&video_type=flv&termid=1&tss=no&geo=CN-19-263-1&platid=2&splatid=203&its=0&qos=5&proxy=2031020102,2103118283,3683272586&keyitem=rxWmhiz4nvsenbC4B_PU1Ho7JhJWOKmfhaz0NA..&ntm=1443128400&nkey=d65a54b0694703b260c0ac9e6743c0c0&nkey2=bcbd3a2392bff0122b5badcaa83ed427&mltag=1&mmsid=35201158&tm=1443109874&key=2c431f1d04a4a9e64c1ecb781c8846ba&playid=0&vtype=27&cvid=1593626887510&payff=0&tag=flash&sign=bcloud_100172&pay=0&ostype=windows&hwtype=un&ch=bcloud_100172&tn=0.7492179414257407&uuid=FC0135E5434A678BB0B29CBE3265986783B3871B_1&p1=3&p2=30&p3=300&vid=15897364&rateid=yuanhua&errc=0&gn=1010&buss=59002&cips=202.104.157.195",
"nodelist": [
"gone": 1010,
"name": "广东省-电信-1",
"pid": 19,
"aid": 250,
"isp": 1,
"detail": "ratiofix:1010/829,1012,834,1021,1021,1061,1061,1061,2000,879,879,1032,1032,1054,1054,1054,1010,1010,1022",
"playlevel": 2,
"slicetime": 480,
"leavetime": 90,
"location": "http://125.91.9.75/161/43/112/bcloud/100172/1001448841-avc-5550059-aac-125686-220021-160174213-510bceaba47f59737a277269c3016ee9-1442850716371.letv?crypt=66aa7f2e582300&b=5823&nlh=3072&nlt=45&bf=8000&p2p=1&video_type=flv&termid=1&tss=no&geo=CN-19-263-1&platid=2&splatid=203&its=0&qos=5&proxy=2031020102,2103118283,3683272586&keyitem=rxWmhiz4nvsenbC4B_PU1Ho7JhJWOKmfhaz0NA..&ntm=1443128400&nkey=d65a54b0694703b260c0ac9e6743c0c0&nkey2=bcbd3a2392bff0122b5badcaa83ed427&mltag=1&mmsid=35201158&tm=1443109874&key=2c431f1d04a4a9e64c1ecb781c8846ba&playid=0&vtype=27&cvid=1593626887510&payff=0&tag=flash&sign=bcloud_100172&pay=0&ostype=windows&hwtype=un&ch=bcloud_100172&tn=0.7492179414257407&uuid=FC0135E5434A678BB0B29CBE3265986783B3871B_1&p1=3&p2=30&p3=300&vid=15897364&rateid=yuanhua&errc=0&gn=1010&buss=59002&cips=202.104.157.195"
,
"gone": 1012,
"name": "广东省-电信-2",
"pid": 19,
"aid": 263,
"isp": 1,
"detail": "manual:1012,834,829,2000,879,1032,1054,1061,1010,881,877",
"playlevel": 4,
"slicetime": 153,
"leavetime": 52,
"location": "http://121.201.106.75/161/43/112/bcloud/100172/1001448841-avc-5550059-aac-125686-220021-160174213-510bceaba47f59737a277269c3016ee9-1442850716371.letv?crypt=66aa7f2e582300&b=5823&nlh=3072&nlt=45&bf=8000&p2p=1&video_type=flv&termid=1&tss=no&geo=CN-19-263-1&platid=2&splatid=203&its=0&qos=5&proxy=236027849,2031020102,3683272586&keyitem=rxWmhiz4nvsenbC4B_PU1Ho7JhJWOKmfhaz0NA..&ntm=1443128400&nkey=d65a54b0694703b260c0ac9e6743c0c0&nkey2=bcbd3a2392bff0122b5badcaa83ed427&mltag=1&mmsid=35201158&tm=1443109874&key=2c431f1d04a4a9e64c1ecb781c8846ba&playid=0&vtype=27&cvid=1593626887510&payff=0&tag=flash&sign=bcloud_100172&pay=0&ostype=windows&hwtype=un&ch=bcloud_100172&tn=0.7492179414257407&uuid=FC0135E5434A678BB0B29CBE3265986783B3871B_1&p1=3&p2=30&p3=300&vid=15897364&rateid=yuanhua&errc=0&gn=1012&buss=59002&cips=202.104.157.195"
,
"gone": 834,
"name": "广东省-电信-3",
"pid": 19,
"aid": 250,
"isp": 1,
"detail": "manual:1012,834,829,2000,879,1032,1054,1061,1010,881,877",
"playlevel": 2,
"slicetime": 480,
"leavetime": 90,
"location": "http://121.14.232.70/161/43/112/bcloud/100172/1001448841-avc-5550059-aac-125686-220021-160174213-510bceaba47f59737a277269c3016ee9-1442850716371.letv?crypt=66aa7f2e582300&b=5823&nlh=3072&nlt=45&bf=8000&p2p=1&video_type=flv&termid=1&tss=no&geo=CN-19-263-1&platid=2&splatid=203&its=0&qos=5&proxy=2103118155,2103118283,3683272586&keyitem=rxWmhiz4nvsenbC4B_PU1Ho7JhJWOKmfhaz0NA..&ntm=1443128400&nkey=d65a54b0694703b260c0ac9e6743c0c0&nkey2=bcbd3a2392bff0122b5badcaa83ed427&mltag=1&mmsid=35201158&tm=1443109874&key=2c431f1d04a4a9e64c1ecb781c8846ba&playid=0&vtype=27&cvid=1593626887510&payff=0&tag=flash&sign=bcloud_100172&pay=0&ostype=windows&hwtype=un&ch=bcloud_100172&tn=0.7492179414257407&uuid=FC0135E5434A678BB0B29CBE3265986783B3871B_1&p1=3&p2=30&p3=300&vid=15897364&rateid=yuanhua&errc=0&gn=834&buss=59002&cips=202.104.157.195"
]
哔哩哔哩唧唧
打开哔哩哔哩唧唧。输入 b 站 AV 号。例如 2945462。
跳转到 http://www.bilibilijj.com/Video/Av2945462,查看源码,发现 flv 下载是直接获取的。而 mp4 格式需要在服务器转码,所以需要跳转。flv 下载会先获取 cid,通过拼接就可以直接进行重定位(location)到视频下载的地址。
http://www.bilibilijj.com/DownLoad/Cid/4610711。那么问题来啦,怎么通过视频的 av 号,获取视频的 cid 呢。
- 通过前后 av 号的 cid 推测
http://interface.bilibili.tv/playurl?otype=<类型>&cid=<CID>&type=<视频类型>
参数:
otype: 可选xml/json 默认XML
type: 可选flv/mp4 MP4为低质量 移动设备格式 建议使用FLV
cid: API中提供的CID号
通过 av 号获取 cid
http://app.bilibili.com/bangumi/avseason/<AV号>.ver?callback=seasonJsonCallback&_=1443180629244
如下,是一个专辑页面
其实是番剧 bangumi
http://app.bilibili.com/bangumi/avseason/2913927.ver?callback=seasonJsonCallback&_=1443180629244
av: 2913927
cid: 4556625
seasonJsonCallback($$JSON)
"code": "0",
"message": "success",
"result":
"favorites": "5215",
"copyright": null,
"bangumi_id": "1809",
"weekday": "3",
"tag2s": [ ],
"title": "口水三国",
"spid": null,
"danmaku_count": "42867",
"cover": "http://i1.hdslb.com/sp/61/6164e5b24f425bef46af20b69a44344a.jpg",
"new_ep": null,
"allow_bp": "0",
"related_seasons": [ ],
"alias": "糖水三国",
"newest_ep_id": "69694",
"episodes": [
"cover": "http://i2.hdslb.com/video/b1/b15d136ad5075df93738865e60c5dd00.jpg",
"index_title": "口水三国 45 王朗篇 再说一句厚颜无耻信不信我打死你!",
"update_time": "2015-09-23 10:43:34.0",
"episode_id": "69694",
"webplay_url": null,
"coins": "202",
"is_webplay": "0",
"av_id": "2944818",
"danmaku": "4609559",
"index": "王朗篇",
"page": "0",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/bf/bfdd93b4bc355e8a9e1c6ee0c3a91267.jpg",
"index_title": "口水三国 44 刘禅篇 让我买单不让我玩儿你们逗我!",
"update_time": "2015-09-16 09:58:42.0",
"episode_id": "69009",
"webplay_url": null,
"coins": "329",
"is_webplay": "0",
"av_id": "2913927",
"danmaku": "4556625",
"index": "刘禅篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i0.hdslb.com/video/40/4072c2eab7680b69b68aded35fa25d7e.jpg",
"index_title": "口水三国 43 邓艾篇 来自一个农民伯伯的自白",
"update_time": "2015-09-09 10:18:19.0",
"episode_id": "68495",
"webplay_url": null,
"coins": "142",
"is_webplay": "0",
"av_id": "2883641",
"danmaku": "4505618",
"index": "邓艾篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i0.hdslb.com/video/4f/4f94f2a57d218c45d0ff210b9802a28b.jpg",
"index_title": "口水三国 42 钟会篇 姜维在手,天下我有!",
"update_time": "2015-08-26 10:17:27.0",
"episode_id": "66198",
"webplay_url": null,
"coins": "284",
"is_webplay": "0",
"av_id": "2807014",
"danmaku": "4384545",
"index": "钟会篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i2.hdslb.com/video/f0/f0ffdc034df2fd5b10dd587f48f94e47.jpg",
"index_title": "《口水三国》 - 41姜维篇 - 北伐大法好,RP天天跑",
"update_time": "2015-08-19 10:39:50.0",
"episode_id": "65372",
"webplay_url": "",
"coins": "168",
"is_webplay": "0",
"av_id": "2762687",
"danmaku": "4315377",
"index": "姜维篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/49/4916fe3257adf0580f5d0d3beb839aca.jpg",
"index_title": "《口水三国》 - 40张昭篇 - 仲谋不打架,嘴炮世无双!",
"update_time": "2015-08-05 10:14:16.0",
"episode_id": "64393",
"webplay_url": "",
"coins": "204",
"is_webplay": "0",
"av_id": "2683741",
"danmaku": "4192535",
"index": "张昭篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/0d/0d5895a3d6b41e0819b5e3b65178e5b7.jpg",
"index_title": "《口水三国》 - 39张鲁篇 - 身在邪教心向曹,丞相你是我真爱!",
"update_time": "2015-07-29 09:50:23.0",
"episode_id": "64392",
"webplay_url": "",
"coins": "259",
"is_webplay": "0",
"av_id": "2645342",
"danmaku": "4130686",
"index": "张鲁篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/u_user/7ac9b8ded2888ed6b9bf6efa72d989bf.jpg",
"index_title": "《口水三国》 - 05何进篇 - 让本将军还天下人一个朗朗大汉!",
"update_time": "2014-10-29 09:55:19.0",
"episode_id": "64358",
"webplay_url": "",
"coins": "46",
"is_webplay": "0",
"av_id": "1664166",
"danmaku": "2534688",
"index": "何进篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/21/21d335d9287871fc80cee9aee5d01d8f.jpg",
"index_title": "《口水三国》 - 35凌统篇 - 干你甘宁干你甘宁!",
"update_time": "2015-07-01 09:58:07.0",
"episode_id": "64388",
"webplay_url": "",
"coins": "298",
"is_webplay": "0",
"av_id": "2509792",
"danmaku": "3922586",
"index": "凌统篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i0.hdslb.com/u_user/f583fadeee6637ee234e767cb4e822d8.jpg",
"index_title": "《口水三国》 - 06黄忠篇 - 我们两个之间可以有故事啊!",
"update_time": "2014-11-05 10:57:12.0",
"episode_id": "64359",
"webplay_url": "",
"coins": "153",
"is_webplay": "0",
"av_id": "1684669",
"danmaku": "2568440",
"index": "黄忠篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i2.hdslb.com/video/84/840129692d71ac401947b7537eb6b1a0.jpg",
"index_title": "《口水三国》 - 34贾诩篇 - 五毒俱全,唯独缺德!",
"update_time": "2015-06-24 10:34:23.0",
"episode_id": "64387",
"webplay_url": "",
"coins": "439",
"is_webplay": "0",
"av_id": "2477107",
"danmaku": "3878330",
"index": "贾诩篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/u_user/672eec62257a38f411b8065b9c171965.jpg",
"index_title": "《口水三国》 - 07郭嘉篇 - 主公要我陪睡这到底正不正常?!",
"update_time": "2014-11-12 09:37:51.0",
"episode_id": "64360",
"webplay_url": "",
"coins": "369",
"is_webplay": "0",
"av_id": "1705015",
"danmaku": "2602635",
"index": "郭嘉篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/c9/c964af5c4507232876f32b4fbec4e1f3.jpg",
"index_title": "《口水三国》 - 33张郃篇 - 你才是柱子!你们全家都是柱子!",
"update_time": "2015-06-17 10:19:02.0",
"episode_id": "64386",
"webplay_url": "",
"coins": "524",
"is_webplay": "0",
"av_id": "2448201",
"danmaku": "3833406",
"index": "张郃篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/e1/e145ed648e04c89c923b741e59536148.jpg",
"index_title": "《口水三国》 - 32荀彧篇 - 不升,主公我们不升!",
"update_time": "2015-06-10 09:38:35.0",
"episode_id": "64385",
"webplay_url": "",
"coins": "338",
"is_webplay": "0",
"av_id": "2421616",
"danmaku": "3790327",
"index": "荀彧篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/3a/3a63d3cabd07db8bbfb68fadf81e19f9.jpg",
"index_title": "《口水三国》 - 31朱治篇 - 要不要来和我一起打拳啊?",
"update_time": "2015-06-03 10:16:41.0",
"episode_id": "64384",
"webplay_url": "",
"coins": "285",
"is_webplay": "0",
"av_id": "2393888",
"danmaku": "3745874",
"index": "朱治篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i0.hdslb.com/video/9d/9d4d0eed068a201adf35b714f11236dd.jpg",
"index_title": "《口水三国》 - 30袁绍篇 - 千万别小看捡破烂的和开小车的!",
"update_time": "2015-05-27 11:07:00.0",
"episode_id": "64383",
"webplay_url": "",
"coins": "395",
"is_webplay": "0",
"av_id": "2369064",
"danmaku": "3703855",
"index": "袁绍篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i0.hdslb.com/video/b8/b88bfc546dee06f91b236e587f61a80e.jpg",
"index_title": "《口水三国》 - 29关平篇 - 爸爸再也不用担心我不会砍人啦!",
"update_time": "2015-05-20 10:04:24.0",
"episode_id": "64382",
"webplay_url": "",
"coins": "449",
"is_webplay": "0",
"av_id": "2343972",
"danmaku": "3660274",
"index": "关平篇",
"page": "1",
"up":
"mid": null,
"up": null
,
"cover": "http://i1.hdslb.com/video/5c/5c0522754841ee0afba41a046b3b989e.jpg",
"index_title": "《口水三国》 - 28公孙瓒篇 - 一切尽在不言中!",
"update_time": "2015-05-13 09:52:24.0",
"ahjesus-2020 哔哩哔哩 bilibili 批量下载工具,多 P 解析,定期更新
如何下载B站哔哩哔哩(bilibili)弹幕网站上的视频呢?小白教你个简单方法
哔哩哔哩ios版怎样像Android版一样可以随意放大调整视频?