乐视云视频真实地址解析方法
in 杂项 with 0 comment

乐视云视频真实地址解析方法

in 杂项 with 0 comment

这次分析的网站是:http://www.gogoup.com/

研究了一会,做不了自动获取,要手动。


1.获取乐视云播放地址

QQ截图20161109142527.png

首先随便打开一个播放页,然后F12进入开发模式。

输入以下code:


    //高高手的js里有一行var p = new CloudVodPlayer();实例化了乐视云的播放器
    //至于.sdk.getVideoSetting参照乐视云的api文档
    video = p.sdk.getVideoSetting();
    console.log(video.url);

sdk.getVideoSetting在乐视云的api文档中是返回视频设置参数的。

QQ截图20161109142952.png

如图,虽然在video.playInfoList.17.url中也有一个url参数,不过这个json返回的内容是一个m3u8的文件。

QQ截图20161109143056.png

所以直接采用video.url,跳转到乐视云的播放页。

到了这里似乎浏览器输出的依旧是ts流文件,跟在高高手站内浏览一致,难道真的获取不了mp4文件?只能自己获取多个ts之后合并?

可我们注意到video.playInfoList.17.storepath已经显示了该视频的MP4文件地址,由于无法获取详细的页面参数,所以即使我们打开这个storepath也依旧会是403页面。

2.乐视云的播放页

后来误打误撞发现了一个办法。

1.首先把浏览器的UA设置为galaxy S5(任意的手机UA应该都行)
2.把当前页面刷新一次(这个地址应该做了HTTP_REFERER 的check,有时候会出现获取不到的情况)。

3.F12进入开发者模式,进入Sources选项卡

1.刷新页面,点击播放视频。

QQ截图20161109144407.png

你会发现Sources里多了一个play.g3proxy.lecloud.com的目录

2.点开vod/v2里那个文件,新标签页打开


    letvcloud14786738358762({ "status": 200, "ercode": 0, "erinfo": "", "ipint": "1879738228", "remote": "112.10.135.116", "host": "112.10.135.116", "ipstart": "112.10.0.0", "ipend": "112.10.255.255", "geo": "CN.11.140.4", "desc": "中国-浙江省-杭州市-移动", "country": "CN", "gone": 336, "buss": "bussid=131793,alv=80,orgqos=5,host=2,port=80", "level": 98, "usep2p": 1, "flag": "0", "pool": "CDN-JS-SZ-CMCC", "detail": "qosfix_ratio:336\/89", "playlevel": 2, "slicetime": 480, "leavetime": 120, "expect": 3, "actual": 3, "needtest": 0, "curtime": 1478673874, "starttime": 0, "endtime": 0, "cliptime": 6, "timeshift": 168.000000, "dir": "", "cdnpath": "", "livep2p": 1, "mustm3u8": 0, "channelid": 0, "livesftime": 60, "livesfmust": 0, "maxsftime": 200, "maxslicesize": 60, "forcegslb": 10800, "updatecdn": 10800, "privrange": 0, "openrange": 1, "downpolicy": 0, "systemload": "28.40", "identify": "2067524833:8125", "location": "http:\/\/183.213.26.108\/137\/39\/101\/bcloud\/131793\/ver_00_22-319325213-avc-229763-aac-32003-1335080-45167611-900a63469413098722065b214cec5757-1431967103662.mp4?crypt=6aa7f2e265&b=270&nlh=4096&nlt=60&bf=79&p2p=1&video_type=mp4&termid=2&tss=no&platid=2&splatid=206&its=0&qos=5&fcheck=0&amltag=131793&mltag=131793&proxy=2025866222,3719678598,2007471004&uid=1879738228.rp&keyitem=GOw_33YJAAbXYE-cnQwpfLlv_b2zAkYctFVqe5bsXQpaGNn3T1-vhw..&ntm=1478692200&nkey=ac6b95b0fabbdf906a6da279cb1d1c8c&nkey2=b68c1063820369b00642f6bc4b96b9ec&geo=CN-11-140-4&mmsid=26147830&tm=1478673815179&key=f7a521a5c0758704d10bba3e12ad39da&payff=0&cuid=131793&vtype=21&dur=1335&p1=3&p2=31&p3=310&cf=h5-android&p=101&playid=0&tag=mobile&sign=bcloud_131793&pay=0&ostype=android&hwtype=un&uuid=FB0490EA047B0447C60DC37CE8FB0692_0&vid=8923553&ajax=1&_r=jsonp&errc=0&gn=336&vrtmcd=107&buss=131793&cips=112.10.135.116", "nodelist": [ { "gone": 336, "name": "中国-江苏省-移动-1", "pid": 10, "aid": 131, "isp": 4, "detail": "qosfix_ratio:336\/89", "playlevel": 2, "slicetime": 480, "leavetime": 120, "location": "http:\/\/183.213.26.108\/137\/39\/101\/bcloud\/131793\/ver_00_22-319325213-avc-229763-aac-32003-1335080-45167611-900a63469413098722065b214cec5757-1431967103662.mp4?crypt=6aa7f2e265&b=270&nlh=4096&nlt=60&bf=79&p2p=1&video_type=mp4&termid=2&tss=no&platid=2&splatid=206&its=0&qos=5&fcheck=0&amltag=131793&mltag=131793&proxy=2025866222,3719678598,2007471004&uid=1879738228.rp&keyitem=GOw_33YJAAbXYE-cnQwpfLlv_b2zAkYctFVqe5bsXQpaGNn3T1-vhw..&ntm=1478692200&nkey=ac6b95b0fabbdf906a6da279cb1d1c8c&nkey2=b68c1063820369b00642f6bc4b96b9ec&geo=CN-11-140-4&mmsid=26147830&tm=1478673815179&key=f7a521a5c0758704d10bba3e12ad39da&payff=0&cuid=131793&vtype=21&dur=1335&p1=3&p2=31&p3=310&cf=h5-android&p=101&playid=0&tag=mobile&sign=bcloud_131793&pay=0&ostype=android&hwtype=un&uuid=FB0490EA047B0447C60DC37CE8FB0692_0&vid=8923553&ajax=1&_r=jsonp&errc=0&gn=336&vrtmcd=107&buss=131793&cips=112.10.135.116" }, { "gone": 317, "name": "中国-浙江省-移动-1", "pid": 11, "aid": 140, "isp": 4, "detail": "qosfix:317,314,311,310,309,122,127,336,337,1902", "playlevel": 2, "slicetime": 480, "leavetime": 120, "location": "http:\/\/111.1.61.230\/137\/39\/101\/bcloud\/131793\/ver_00_22-319325213-avc-229763-aac-32003-1335080-45167611-900a63469413098722065b214cec5757-1431967103662.mp4?crypt=6aa7f2e303&b=270&nlh=4096&nlt=60&bf=90&p2p=1&video_type=mp4&termid=2&tss=no&platid=2&splatid=206&its=0&qos=5&fcheck=0&amltag=131793&mltag=131793&proxy=2025866222,3719678598,2007471004&uid=1879738228.rp&keyitem=GOw_33YJAAbXYE-cnQwpfLlv_b2zAkYctFVqe5bsXQpaGNn3T1-vhw..&ntm=1478692200&nkey=ac6b95b0fabbdf906a6da279cb1d1c8c&nkey2=b68c1063820369b00642f6bc4b96b9ec&geo=CN-11-140-4&mmsid=26147830&tm=1478673815179&key=f7a521a5c0758704d10bba3e12ad39da&payff=0&cuid=131793&vtype=21&dur=1335&p1=3&p2=31&p3=310&cf=h5-android&p=101&playid=0&tag=mobile&sign=bcloud_131793&pay=0&ostype=android&hwtype=un&uuid=FB0490EA047B0447C60DC37CE8FB0692_0&vid=8923553&ajax=1&_r=jsonp&errc=0&gn=317&vrtmcd=108&buss=131793&cips=112.10.135.116" }, { "gone": 314, "name": "中国-浙江省-移动-2", "pid": 11, "aid": 140, "isp": 4, "detail": "qosfix:317,314,311,310,309,122,127,336,337,1902", "playlevel": 2, "slicetime": 480, "leavetime": 120, "location": "http:\/\/218.205.77.230\/137\/39\/101\/bcloud\/131793\/ver_00_22-319325213-avc-229763-aac-32003-1335080-45167611-900a63469413098722065b214cec5757-1431967103662.mp4?crypt=6aa7f2e303&b=270&nlh=4096&nlt=60&bf=90&p2p=1&video_type=mp4&termid=2&tss=no&platid=2&splatid=206&its=0&qos=5&fcheck=0&amltag=131793&mltag=131793&proxy=3719678598,2025866222,2007471004&uid=1879738228.rp&keyitem=GOw_33YJAAbXYE-cnQwpfLlv_b2zAkYctFVqe5bsXQpaGNn3T1-vhw..&ntm=1478692200&nkey=ac6b95b0fabbdf906a6da279cb1d1c8c&nkey2=b68c1063820369b00642f6bc4b96b9ec&geo=CN-11-140-4&mmsid=26147830&tm=1478673815179&key=f7a521a5c0758704d10bba3e12ad39da&payff=0&cuid=131793&vtype=21&dur=1335&p1=3&p2=31&p3=310&cf=h5-android&p=101&playid=0&tag=mobile&sign=bcloud_131793&pay=0&ostype=android&hwtype=un&uuid=FB0490EA047B0447C60DC37CE8FB0692_0&vid=8923553&ajax=1&_r=jsonp&errc=0&gn=314&vrtmcd=108&buss=131793&cips=112.10.135.116" } ] });

他会返回一个很长的json,百度找个在线json格式化工具把它格式化。在这里楼主用的Google浏览器的插件

注:返回的json指letvcloud14786738358762();里的{...}内容

QQ截图20161109144945.png

往下拉,你会看到nodelist:

QQ截图20161109145039.png

点开任意一个location里的链接都能打开视频的原MP4。

nodelist应该只是分布的cdn节点。。。

QQ截图20161109145155.png

到这里就可以在视频上【右击 - 另存为】了。。

Comments are closed.