avatar

目录
B站弹幕列表获取

每个视频(包括番剧)的弹幕文件

  当你每次请求某个B站视频网页的时候

  服务器都会给你由xhr接口发送一个的xml文件

  地址格式为:

https://api.bilibili.com/pgc/view/web/section/order?ep_id=视频oid

  至于这个oid在视频信息api列表里,如下

https://api.bilibili.com/x/player/pagelist?aid=视频av号(只要数字)&jsonp=jsonp

如图为你的名字页面


弹幕历史文件

  查看历史弹幕文件首先要查看哪些日期有弹幕

  只要有弹幕发送都会有弹幕文件生成

  但遗憾的是这些文件的弹幕条数都会根据时长来受到限制

  所以只能看见一小部分弹幕

  弹幕日期列表查看格式为:

https://api.bilibili.com/x/v2/dm/history/index?type=1&oid=视频oid&month=年份-月份

  然后它会返回json文件,就比如这样

json
{"code":0,"message":"0","ttl":1,"data":["2020-01-01","2020-01-02","2020-01-03","2020-01-04","2020-01-05","2020-01-06","2020-01-07","2020-01-08","2020-01-09","2020-01-10","2020-01-11","2020-01-12","2020-01-13","2020-01-14","2020-01-15","2020-01-16","2020-01-17","2020-01-18","2020-01-19","2020-01-20","2020-01-21","2020-01-22","2020-01-23","2020-01-24","2020-01-25","2020-01-26","2020-01-27","2020-01-28","2020-01-29","2020-01-30","2020-01-31"]}

  这样就能知道哪些时候有弹幕文件了

  再进行弹幕文件的获取,格式为:

https://api.bilibili.com/x/v2/dm/history?type=1&oid=视频oid&date=--

  返回的也是个xml文件

  里面包括弹幕条数、弹幕文本、弹幕颜色等等


最后附一份黯淡神殇某个视频弹幕的xml文件

xml
<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>34623411</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><d p="17.10700,1,25,16777215,1504366433,0,461cf5fa,4405302956">我已经看完了2333</d><d p="185.99000,1,25,16777215,1504365455,0,43d6d0b4,4405302955">突然觉得打上花火配这电影也没什么违和感??</d><d p="239.99000,1,25,16777215,1504360324,0,bf017908,4405302954">不,剪的太好了</d><d p="39.74200,1,25,16777215,1504360017,0,ed833b16,4405302953">9月8号</d><d p="11.43300,1,25,16711680,1504352736,0,8d7a36aa,4405302951">剪辑都是神·看原作就不知道会不会这么虐心了</d><d p="210.57600,1,25,16777215,1504351342,0,6ae8cfa6,4405302949">这段正好和打上火花的歌词特别配</d><d p="31.49900,1,25,16777215,1504348337,0,f4b652f5,4405302948">bgm打上花火</d><d p="285.14100,1,25,16777215,1504340635,0,900e055a,4405302945">这个笑容由我来守护</d><d p="19.46000,1,25,16777215,1504336935,0,624ce20b,4405302944">什么鬼,BGM烟花的打上花火?</d><d p="233.99500,1,25,16777215,1504336047,0,f8c7537b,4405302943">这个结局很虐吗?</d><d p="161.42200,1,25,15138834,1504328967,0,6c532d6,4405302942">记得你的名字却听不到你的声音(╥╯﹏╰╥)</d><d p="12.80200,1,25,15138834,1504328876,0,6c532d6,4405302941">记得你的名字却听不到你的声音(╥╯﹏╰╥)</d><d p="82.02000,1,25,16777215,1504326590,0,36f0881e,4405302940">烟花的bgm</d><d p="20.85700,1,25,16777215,1504321277,0,43a641fd,4405302939">这个很虐的</d><d p="10.02000,5,25,15138834,1504319072,0,48eb3d64,4405302937">bgm:打上花火</d><d p="143.16400,4,25,39372,1504312304,0,5ab9e82a,4405302936">BGM:打上花火</d><d p="104.06900,1,25,16777215,1504312248,0,dfeae885,4405302935">要不是我看过,真的就该觉得打上花火是声之形的BGM了</d><d p="7.84000,1,25,16777215,1504311649,0,26283f7d,4405302934">好评</d><d p="147.44400,5,25,41194,1504310824,0,c0416dac,4405302933">bgm是什么</d><d p="231.12400,1,25,16777215,1504309986,0,fbe93b3a,4405302932">期待</d><d p="109.07600,1,25,16777215,1504309864,0,fbe93b3a,4405302931">前面打死不看简介系类</d><d p="70.01100,1,25,16777215,1504309359,0,3397bed4,4405302930">9.8电影院</d><d p="71.61700,1,25,15138834,1504286559,0,33f37c4a,4405302929">bgm 打上火花 烟火的OP</d><d p="208.70100,1,25,16777215,1504280241,0,c893659,4405302927">最近烟花这部动漫很火但是我觉得并不好看。。。除了歌好听</d><d p="209.66400,5,25,16777215,1504278450,0,43e27da6,4405302926">6</d><d p="49.87800,1,25,16777215,1504277343,0,f6c490e9,4405302925">前面的,未来是我的,别以为这里人少你就能偷偷抱走</d><d p="236.20300,1,25,16777215,1504276769,0,5dae7261,4405302924">其实相当于粗略地看完了。。</d><d p="189.86700,1,25,16777215,1504276654,0,5dae7261,4405302923">神剪辑厉害</d><d p="212.21500,1,25,16777215,1504271500,0,d94b7f54,4405302922">问bgm的退群吧</d><d p="171.83900,4,25,13421670,1504270647,0,9c5efb7,4405302921">好想看</d><d p="92.14900,1,25,16777215,1504270405,0,78223b5c,4405302920">BGM;打上花火</d><d p="74.03500,1,25,16777215,1504270387,0,78223b5c,4405302919">男主只会欺负女主前面</d><d p="206.00900,1,25,16777215,1504269065,0,f4079093,4405302918">BGM:打上烟花  BGM:打上烟花  BGM:打上烟花重要的事情辉三遍</d><d p="36.37600,1,25,16777215,1504268077,0,c00a6edb,4405302917">万能的打上花火</d><d p="63.88000,1,25,16777215,1504267556,0,934e42ed,4405302916">傲娇男主</d><d p="93.97700,1,25,16777215,1504266025,0,f01591b5,4405302915">打上花火</d><d p="207.18700,1,25,16777215,1504265174,0,8123bafa,4405302914">打死都不看标题系列,还讲三遍</d><d p="207.02500,1,25,16777215,1504262617,0,42bad453,4405302913">求bgm的自己看简介去</d><d p="1.95900,1,25,16777215,1504256315,0,2d4ba940,4405302912">前排提示,简介里有bgm信息</d><d p="79.18900,1,25,16777215,1504256040,0,85e62c66,4405302911">bgm是什么</d><d p="182.51000,1,25,16777215,1504254743,0,6834ac07,4405302910">生日快乐</d><d p="55.59300,1,25,16777215,1504253483,0,ddc13e0,4405302909">烟花的OP</d><d p="66.81500,1,25,16777215,1504251644,0,a5e38d8f,4405302908">神作太多我的泪点被提高了</d><d p="13.02400,1,25,16777215,1504247138,0,3d14abca,4405302907">为什么声之形放的是烟花的BGM</d><d p="207.46700,1,25,16777215,1504243536,0,d3b66f15,4405302906">打上花火</d><d p="29.61900,1,25,16777215,1504243297,0,622d0cd,4405302905">9月8日中国上映</d><d p="74.01900,1,25,16777215,1504242898,0,6c584e91,4405302904">好好听</d><d p="201.52900,1,25,16777215,1504242182,0,e7e52d15,4405302903">求BGM,求BGM,求BGM,重要的事情说三遍</d><d p="14.05000,1,25,10092543,1504241858,0,68fe7cd9,4405302902">承包硝子</d><d p="134.13900,1,25,16777215,1504239143,0,79ca1c1e,4405302901">BGM</d><d p="49.97900,1,25,16777215,1504239059,0,79ca1c1e,4405302900">关上前25的大门</d><d p="64.06100,1,25,15138834,1504237736,0,a38cab5c,4405302899">诸君走开,这是我老婆西宫硝子</d><d p="20.39100,1,25,16777215,1504235513,0,d458a6bd,4405302898">qian</d><d p="212.91800,1,25,16777215,1504235064,0,914b30cf,4405302897">我想哭了,非常好</d><d p="91.49700,1,25,16777215,1504231938,0,ec5b8a96,4405302895">前方八爷强势出场</d><d p="17.58000,1,25,16777215,1504228070,0,d7f14aba,4405302894">外版的,看完哭了T﹏T,大家真的可以看一下</d><d p="28.34100,1,25,16777215,1504226450,0,3db8df68,4405302893">烟花的op!</d><d p="27.64800,1,25,16777215,1504206042,0,1f27a1ed,4405302890">这个特别棒</d><d p="23.95700,1,25,16777215,1504201852,0,bd255fc3,4405302889">烟花吖</d><d p="2.97800,1,25,16777215,1504198601,0,c4cafef3,4405302888">第一</d><d p="227.26800,1,25,16777215,1504197405,0,c6d39e2c,4405302887">哇看到这我感觉被剧透了,还以为是预告呢</d><d p="104.45200,1,25,16777215,1504196593,0,d6547a05,4405302886">生日快乐UP主 ^O^</d><d p="28.20000,1,25,16777215,1504196587,0,9ff1587a,4405302885">bgm把我炸出来了,我的歌单啊</d><d p="23.46800,1,25,16777215,1504196500,0,563e052,4405302882">153</d><d p="22.80700,1,25,16777215,1504196081,0,f2e6bb22,4405302881">关上前十大门</d><d p="212.24800,4,25,16777215,1504195757,0,8e4f2faf,4405302880">  硝子</d><d p="4.72800,1,25,16777215,1504195748,0,1ad65a99,4405302879">13 前排</d><d p="286.43900,5,25,15138834,1504195570,0,7f73f22a,4405302878">承包这个笑容</d><d p="27.89200,1,25,16777215,1504195543,0,c1be9ec8,4405302877">没人第一我我要了</d><d p="211.94200,5,25,14811775,1504195462,0,728dcf19,4405302876">硝子</d><d p="211.20200,5,25,14811775,1504195457,0,728dcf19,4405302874">硝子</d><d p="31.50100,1,25,16777215,1504195322,0,8a37b065,4405302873">打上烟火</d></i>
打赏
  • 微信
    微信
  • 支付宝
    支付宝

评论