Closed necan closed 4 years ago
downloader/downloader.go#L174
// Download download urls
func Download(v Data, refer string, chunkSizeMB int) error {
v.genSortedStreams()
if config.ExtractedData {
jsonData, _ := json.MarshalIndent(v, "", " ")
fmt.Printf("%s\n", jsonData)
return nil
}
导出的也是符合Json标准的,如果不行,请提供你认为错误的输出,和对应的输入操作
导出单个地址是没有问题的,但一旦使用 -p
选项导出列表,就出问题了。
annie -p -j https://www.bilibili.com/video/av93041958
输出如下:
{
"site": "哔哩哔哩 bilibili.com",
"title": "【游戏公开课】游戏产业研究工坊第一课:导论:什么是研究 P1 什么是研究(上)",
"type": "video",
"streams": {
"16": {
"urls": [
{
"url": "http://upos-sz-mirrorhw.bilivideo.com/upgcxcode/62/02/158850262/158850262-1-16.mp4?e=ig8euxZM2rNcNbKVhwdVtWKVhwdVNEVEuCIv29hEn0lqXg8Y2ENvNCImNEVEUJ1miI7MT96fqj3E9r1qNCNEto8g2ENvN03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=\u0026deadline=1583232679\u0026gen=playurl\u0026nbs=1\u0026oi=3683407778\u0026os=hwbv\u0026platform=pc\u0026trid=3b08723d52214df4857371ee491974c1\u0026uipk=5\u0026upsig=17dbadebd1138b988f08ebfe92e3e93a\u0026uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk\u0026mid=0",
"size": 80409550,
"ext": "flv"
}
],
"quality": "流畅 360P",
"size": 80409550
},
"32": {
"urls": [
{
"url": "http://cn-hbyc2-dx-v-03.bilivideo.com/upgcxcode/62/02/158850262/158850262-1-32.flv?expires=1583232600\u0026platform=pc\u0026ssig=xudVax46JNIzvZXAANY8PA\u0026oi=3683407778\u0026trid=3ccdc805255d43529f861970d4ad4f89\u0026nfb=maPYqpoel5MI3qOUX6YpRA==\u0026nfc=1\u0026mid=0",
"size": 138030781,
"ext": "flv"
}
],
"quality": "清晰 480P",
"size": 138030781
},
"64": {
"urls": [
{
"url": "http://upos-sz-mirrorhw.bilivideo.com/upgcxcode/62/02/158850262/158850262-1-64.flv?e=ig8euxZM2rNcNbea7WdVtWea7WdVNEVEuCIv29hEn0lqXg8Y2ENvNCImNEVEUJ1miI7MT96fqj3E9r1qNCNEto8g2ENvN03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=\u0026deadline=1583232679\u0026gen=playurl\u0026nbs=1\u0026oi=3683407778\u0026os=hwbv\u0026platform=pc\u0026trid=51f5d56c306942a68edd4489e6c34477\u0026uipk=5\u0026upsig=e62037a30e2392bf1d731c32c19601a1\u0026uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk\u0026mid=0",
"size": 196366338,
"ext": "flv"
}
],
"quality": "高清 720P",
"size": 196366338
},
"80": {
"urls": [
{
"url": "http://upos-sz-mirrorcos.bilivideo.com/upgcxcode/62/02/158850262/158850262-1-80.flv?e=ig8euxZM2rNcNbR17WdVhoM1hWUVhwdEto8g5X10ugNcXBlqNxHxNEVE5XREto8KqJZHUa6m5J0SqE85tZvEuENvNC8xNEVE9EKE9IMvXBvE2ENvNCImNEVEK9GVqJIwqa80WXIekXRE9IMvXBvEuENvNCImNEVEua6m2jIxux0CkF6s2JZv5x0DQJZY2F8SkXKE9IB5QK==\u0026deadline=1583232679\u0026gen=playurl\u0026nbs=1\u0026oi=3683407778\u0026os=cosbv\u0026platform=pc\u0026trid=1d39f9b6956c4784af92c282c0a5a087\u0026uipk=5\u0026upsig=850261a2ac93d29e09549bd418d39073\u0026uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk\u0026mid=0",
"size": 228857786,
"ext": "flv"
}
],
"quality": "高清 1080P",
"size": 228857786
}
},
"url": "https://www.bilibili.com/video/av93041958"
}
{
"site": "哔哩哔哩 bilibili.com",
"title": "【游戏公开课】游戏产业研究工坊第一课:导论:什么是研究 P2 什么是研究(下)",
"type": "video",
"streams": {
"16": {
"urls": [
{
"url": "http://upos-sz-mirrorcos.bilivideo.com/upgcxcode/96/10/158851096/158851096-1-16.mp4?e=ig8euxZM2rNcNbha7WdVtWha7WdVNEVEuCIv29hEn0lqXg8Y2ENvNCImNEVEUJ1miI7MT96fqj3E9r1qNCNEto8g2ENvN03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=\u0026deadline=1583232679\u0026gen=playurl\u0026nbs=1\u0026oi=3683407778\u0026os=cosbv\u0026platform=pc\u0026trid=9aedd12fec4f442a96858bc8a24d3012\u0026uipk=5\u0026upsig=2e19e0fca6eccd378826b00d35b6b717\u0026uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk\u0026mid=0",
"size": 99715216,
"ext": "flv"
}
],
"quality": "流畅 360P",
"size": 99715216
},
"32": {
"urls": [
{
"url": "http://cn-hbyc2-dx-v-19.bilivideo.com/upgcxcode/96/10/158851096/158851096-1-32.flv?expires=1583232600\u0026platform=pc\u0026ssig=bfl-adhf39VE4L04st1dWA\u0026oi=3683407778\u0026trid=04e95c92e4a2417596a828a64d5d00ed\u0026nfb=maPYqpoel5MI3qOUX6YpRA==\u0026nfc=1\u0026mid=0",
"size": 172675375,
"ext": "flv"
}
],
"quality": "清晰 480P",
"size": 172675375
},
"64": {
"urls": [
{
"url": "http://upos-sz-mirrorhw.bilivideo.com/upgcxcode/96/10/158851096/158851096-1-64.flv?e=ig8euxZM2rNcNbeVhwdVtWeVhwdVNEVEuCIv29hEn0lqXg8Y2ENvNCImNEVEUJ1miI7MT96fqj3E9r1qNCNEto8g2ENvN03eN0B5tZlqNxTEto8BTrNvNeZVuJ10Kj_g2UB02J0mN0B5tZlqNCNEto8BTrNvNC7MTX502C8f2jmMQJ6mqF2fka1mqx6gqj0eN0B599M=\u0026deadline=1583232679\u0026gen=playurl\u0026nbs=1\u0026oi=3683407778\u0026os=hwbv\u0026platform=pc\u0026trid=a0632fa873f747478d94f0544c9c5fee\u0026uipk=5\u0026upsig=b3b142d9609ad76bf7c22471a6fe0f6d\u0026uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk\u0026mid=0",
"size": 240878759,
"ext": "flv"
}
],
"quality": "高清 720P",
"size": 240878759
},
"80": {
"urls": [
{
"url": "http://upos-sz-mirrorcos.bilivideo.com/upgcxcode/96/10/158851096/158851096-1-80.flv?e=ig8euxZM2rNcNbRVhbUVhoM1hwNBhwdEto8g5X10ugNcXBlqNxHxNEVE5XREto8KqJZHUa6m5J0SqE85tZvEuENvNC8xNEVE9EKE9IMvXBvE2ENvNCImNEVEK9GVqJIwqa80WXIekXRE9IMvXBvEuENvNCImNEVEua6m2jIxux0CkF6s2JZv5x0DQJZY2F8SkXKE9IB5QK==\u0026deadline=1583232679\u0026gen=playurl\u0026nbs=1\u0026oi=3683407778\u0026os=cosbv\u0026platform=pc\u0026trid=3a7125ef71264a33961cf7c5d42f4608\u0026uipk=5\u0026upsig=9504fd3bf518429946e956a99bd64bb8\u0026uparams=e,deadline,gen,nbs,oi,os,platform,trid,uipk\u0026mid=0",
"size": 274908853,
"ext": "flv"
}
],
"quality": "高清 1080P",
"size": 274908853
}
},
"url": "https://www.bilibili.com/video/av93041958"
}
提供下你那边的annie版本号
@ma6254 0.9.8
已修复,等待review
-j 导出的不是标准的 json,对后续数据处理造成了麻烦。可以参考下 youtube-dl 或 you-get。