curl "https://api.bilibili.com/x/player/pagelist?aid=11156770&jsonp=jsonp" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" -H "Accept: */*" -H "Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2" --compressed -H "Origin: https://www.bilibili.com" -H "Connection: keep-alive" -H "Referer: https://www.bilibili.com/video/av11156770" -H "Cookie: _uuid=4AD4ADC1-5D9D-4E13-7AA5-E998F72379F804119infoc; buvid3=79B425F1-622D-4798-BB71-FA93D4720BD0190950infoc; LIVE_BUVID=AUTO2215649145029832; CURRENT_FNVAL=16; stardustvideo=1; rpdid=|(J~umR~Y|u)0J'ulYRmuRlJ); fts=1564915598; CURRENT_QUALITY=80; UM_distinctid=16c61e4aee2211-03ff66775b94468-4c312272-e1000-16c61e4aee3ee; im_notify_type_95807857=0; sid=db74nzkd; finger=964b42c0; bp_t_offset_95807857=319067240609713254; INTVER=1"

{"code":0,"message":"0","ttl":1,"data":[{"cid":18459149,"page":1,"from":"vupload","part":"","duration":239,"vid":"","weblink":"","dimension":{"width":0,"height":0,"rotate":0}}]}

curl "https://api.bilibili.com/x/v1/dm/list.so?oid=18459149" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" -H "Accept: */*" -H "Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2" --compressed -H "Origin: https://www.bilibili.com" -H "Connection: keep-alive" -H "Referer: https://www.bilibili.com/video/av11156770" -H "If-Modified-Since: Sat, 16 Nov 2019 21:33:45 GMT"

返回的为xml格式的弹幕,然后用xpath就可以解析了

 

2020年3月10日

根据A_V号,下载弹幕,根据正则匹配,查询历史数据。

根据id下载所有弹幕。