备份几个直播地址解析API

API

最近在研究直播,所以抓包了几个平台的直播地址

但解析返回的都是m3u8的视频格式,所以就写了一个解析m3u8的工具

电脑端访问m3u8地址是直接下载的,无法播放,所以只有利用播放器了

http://tools.67cc.cn/m3u8.php?url=解析地址

我也弄了个影视站,欢迎大家收藏 http://ys.67cc.cn/

下面开始说正题

1.熊猫直播

熊猫直播API[熊猫tv超清解析(更换为大王卡源)]:

下面是熊猫api地址,解析出来的m3u8地址,把_small删除是超清,改成_mid是高清,有兴趣的自由发挥

http://room.api.m.panda.tv/index.php?callback=&method=room.shareapi&roomid=房间ID&_=1501421682458

验证字符段

http://api.m.panda.tv/stream/room/pull/get?roomid=".$id."&roomkey=".$data["data"]["videoinfo"]["room_key"]."&definition_option=1&hardware=1

拼接方法

$url?sign=".$room[data][$id][sign].$room[data][$id][ts]

2.斗鱼直播

https://m.douyu.com/html5/live?roomId=房间ID

返回json

{"error":0,"data":{"hls_url":"http:\/\/hlsa.douyucdn.cn\/live\/78561r5QhYULJVnf_550\/playlist.m3u8?wsSecret=d8d3946519eb91bb8f0c505e7009d69c&wsTime=1516157482&token=h5-douyu-0-78561-6b553222a5328f7d3524823b5bfaecdf&did=h5_did"}}

其中hls_url为直播地址

3.花椒直播

http://g2.live.360.cn/liveplay?channel=live_huajiao_v2&sn=_LC_RE_non_7592038815161146651609319_OX&_rate=xd&stype=m3u8&sid=1516124561076.145&ts=1516124561079&_jsonp=window.Huajiao_player_jsonp1516124561049_1&callback=&callbackfn=Huajiao_player_jsonp1516124561049_1&_=1516124561080

返回json

window.Huajiao_player_jsonp1516124561049_1({"protocal":"public","protocol":"relay","errcode":0,"version":1,"main":"http://qh0-hls.live.huajiao.com/live_huajiao_v2/_LC_RE_non_7592038815161146651609319_OX/index.m3u8","sn":"_LC_RE_non_7592038815161146651609319_OX","app_key":"d41994c71944bcaaa916a203056a6127","timestamp":1516162193538,"ipcc":0,"back":["http://r.live.360.cn/live_huajiao_v2/_LC_RE_non_7592038815161146651609319_OX/index.m3u8",""]});

其中main为直播地址,使用时需将window.Huajiao_player_jsonp1516124561049_1()剪切

4.bilibili直播

我也不知道哔哩哔哩用的是房间号还是什么,这里还没弄清楚

http://api.live.bilibili.com/api/playurl?device=phone&platform=ios&scale=3&build=10000&cid=1238595&otype=json&platform=h5

返回json

{"code":0,"msg":"","data":"http:\/\/qn.wshls.acgvideo.com\/live-qn\/335736\/live_28460442_7569034.m3u8?wsSecret=cd540df1fb2d07837ed46631af4ef08e&wsTime=1516163040","current_quality":4}

其中data为直播地址

5.龙珠直播

我还是没弄清楚房间号在哪

http://liveapi.plu.cn/liveapp/roomstatus?version=3.9.3&device=6&packageId=&roomId=2241164&callback=

其中roomID为房间号

返回json

{"grade":26,"watchCount":10194,"onlineCount":0,"subscribeCount":1152342,"itemCount":0,"cover":"http://img2.plures.net/e9c1/7f33/5895/dd0f/6db1/10c2/2fa3/1257.jpg","title":"","beginTime":"\/Date(-62135596800000)\/","streamUri":"","upStreamUrl":null,"userName":"老实敦厚的笑笑","address":"","result":0,"model":"","liveSourceType":0,"liveStreamType":0,"watchDirections":"","device":0,"playId":0,"sumTcoin":0.0,"playGameId":4,"broadcast":null,"isPtoP":false,"desc":"德云色直播时间:周一至周六(周三周五二台),每晚8点准时直播。微博:笑笑_孙亚龙 西卡_李浩宇贴吧:德云色","type":1,"boardCast_Title":null,"roomId":2241164,"domain":"777777","name":"老实敦厚的笑笑","clubName":"","userId":130888609,"logo":"http://img2.plures.net/0e03/87a2/1f04/274f/1b5e/baea/d7b2/6320.jpg","sex":1}

其中streamUri为直播地址


解析地址出来后可以用HLSPlayer播放器

解析后的效果就是

斗鱼直播 熊猫直播

timg.jpg

相关文章

热门文章

我欲修仙,法力无边

沙发被抢

  1. zhou zhou

    厉害了 !

添加新评论