sohu 真實(shí)視頻地址分析

1.網(wǎng)站sohu視頻

https://tv.sohu.com/v/cGwvOTM5MjYyNy85ODA0NzU4NS5zaHRtbA==.html

2.獲取JS數(shù)據(jù)

GET https://js.tv.itc.cn/player/h5player_8563b2.js HTTP/1.1
Host: js.tv.itc.cnConnection: keep-alive*
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36Intervention:; level="warning"* 
Accept: */*
Referer: https://tv.sohu.com/v/cGwvOTM5MjYyNy85ODA0NzU4NS5zaHRtbA==.html
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9

3.分析JS數(shù)據(jù)
h5player_xxxx.js里面請(qǐng)求函數(shù)如下:

function(e) {
                var t = e.vid,
                i = e.resolution,
                o = e.pwd,
                a = "http://my.tv.sohu.com/play/videonew.do?" + r.
            default.stringify({
                    vid:
                    t,
                    ver: i,
                    ssl: 0 == window.location.href.indexOf("https") ? 1 : 2,
                    referer: window.location.href,
                    t: (new Date).getTime(),
                    passwd: o
                });
                return n.
image

vid參數(shù)可以從網(wǎng)頁源代碼獲取,不再贅述窖梁。

實(shí)際請(qǐng)求結(jié)果:

GET https://my.tv.sohu.com/play/videonew.do?vid=98047585&ver=&ssl=1&referer=https%3A%2F%2Ftv.sohu.com%2Fv%2FcGwvOTM5MjYyNy85ODA0NzU4NS5zaHRtbA%3D%3D.html&t=1536333633784&passwd= HTTP/1.1
Host: my.tv.sohu.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Accept: */*
Referer: https://tv.sohu.com/v/cGwvOTM5MjYyNy85ODA0NzU4NS5zaHRtbA==.html

請(qǐng)求數(shù)據(jù)返回Json字符串

image

{"prot":2,"ct":39,"allot":"vipbjyz.vod.tv.itc.cn","reserveIp":"vipgdbgp.vod.tv.itc.cn","vr":0,"vt":1,"tn":5,"sp":1024,"pid":9392627,"status":1,"play":1,"pL":10,"url":"http://my.tv.sohu.com/us/310340515/98047585.shtml","uS":-1,"fms":0,"isdl":1,"holiday":"0","catcode":127106,"systype":1,"cmscat":"10000001;10000001_127106","id":"98047585_1","p2pflag":1300,"nt":1,"tvid":98047585,"wm_data":{"wm_username":"\u5C0F\u7FD4XIANG","wm_userphoto":"http://001.img.pu.sohu.com.cn/group3/M10/A9/DA/MTAuMTAuODguODM=/MTAwMTE0XzE1MDQyNDcyNDcxMDc=/cut@m=crop,x=0,y=0,w=200,h=200.jpg","wm_video":1,"wm_isact":1,"wm_publisher":1,"wm_playtype":0,"ugu":"310340515","ugcode":"MTUkfdby2mtsz8QJo-zyC5mZGw6fecwX-XCawlk_JCwZ24G12sALibmxjt05F5POTyyVx0lGGj8ITzDrFSkbnxCyx-2xTAjGpjKL","wm_user":20,"fc_user":1,"fc_video":1,"wm_filing":""},"pay_data":{},"data":{"tvName":"\u4E09\u661FGalaxy S9/S9\uFF0B\u56DB\u8272\u63ED\u9732\uFF1F\u4E01\u9999\u7D2B\u5168\u65B0\u767B\u573A\uFF01","keyword":"\u79D1\u6280 \u5C0F\u7FD4XIANG \u6570\u7801 \u624B\u673A \u4E09\u661FS9/S9","tag":"\u79D1\u6280 \u5C0F\u7FD4XIANG \u6570\u7801 \u624B\u673A \u4E09\u661FS9/S9","ch":"pgc","cid":127106,"myTvUid":310340515,"fps":"","ipLimit":"","width":0,"height":0,"clipsURL":[""],"version":1,"clipsBytes":["9784487"],"num":1,"coverImg":"http://001.img.pu.sohu.com.cn/group3/M10/C5/5E/MTAuMTAuODguODM=/MTAwMTE0XzE1MTgxOTQ4NjYzMDk=.jpg","totalDuration":146,"totalBytes":9784487,"clipsDuration":[146],"relativeId":"","totalBlocks":1,"ck":["Y-6jMyOxnsY950v55Q2W6aEVAAJyWj98"],"hc":["TYV6KMPMKQ2XAOWBVE37BKE6M7OG4GG3"],"su":["/111/162/3D4U8DomJrNdKjM5g5DAJC.mp4"],"sT":0,"norVid":"","highVid":"98047585_1","superVid":"98047585_21","oriVid":"98047585_31","eT":0,"eP":null},"syst":1536333673479,"dm":0,"isSelf":0,"audited_level":0}

4.獲取真實(shí)地址
繼續(xù)分析h5player_xxxx.js里面請(qǐng)求函數(shù)如下
js請(qǐng)求

N.prototype.checkMovieInfo = function(e) {
        if (void 0 === e.vid || void 0 === e.ch || void 0 === e.videos) return ! 1;
        console.info(N.getTimeNow(), "start playing, vid is " + e.vid),
        e.totalDuration = 0,
        e.totalSize = 0;
        for (var t = 0; t < e.videos.length; t++) {
            var i = e.videos[t];
            void 0 === i.dispatch && (i.dispatch = "https://data.vod.itc.cn/ip?new=" + i.fileName + "&num=1&key=" + i.key + "&ch=" + e.ch + "&pt=1&pg=2&prod=h5n"),
            console.info(i.dispatch),
            e.totalDuration += Number(i.duration),
            e.totalSize += Number(i.size)
        }
        return ! 0
    },
image

實(shí)際構(gòu)造請(qǐng)求:

GET https://data.vod.itc.cn/ip?new=/111/162/3D4U8DomJrNdKjM5g5DAJC.mp4&num=1&key=Y-6jMyOxnsY950v55Q2W6aEVAAJyWj98&ch=pgc&pt=1&pg=2&prod=h5n HTTP/1.1
Host: data.vod.itc.cn
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36Referer: https://tv.sohu.com/v/cGwvOTM5MjYyNy85ODA0NzU4NS5zaHRtbA==.html

返回json結(jié)果

image
{"servers":[{"nid":644,"isp2p":1,"url":"http://58.211.10.165/sohu/v1/TmwGoEIsWGvHW4P48Dd6qV4l0EXAhtkWWM04b6KlPOXUyYbSoO27fSx.mp4?k=1xXyer&p=XfXIWJo70F2svmfCZM1mNOo70ScAZMx4gf&r=TUldziJCtpCmhWB3tSCGhWlvsmCUqpxWtWaizY&q=OpCGoKOyzSwWsSCAomrGhWqDXpCAoSvyoSxCTLwm0K7G0poWjpCAqSsdqSsAoEOgzSw3oY&cip=xxx.xxx.xxx.xxx"}]}
0

cip 結(jié)果我遮蓋了脾歇。

整個(gè)流程結(jié)束序六。

大功告成!

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末蒙具,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子朽肥,更是在濱河造成了極大的恐慌禁筏,老刑警劉巖,帶你破解...
    沈念sama閱讀 212,816評(píng)論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件鞠呈,死亡現(xiàn)場離奇詭異融师,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)蚁吝,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,729評(píng)論 3 385
  • 文/潘曉璐 我一進(jìn)店門旱爆,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人窘茁,你說我怎么就攤上這事怀伦。” “怎么了山林?”我有些...
    開封第一講書人閱讀 158,300評(píng)論 0 348
  • 文/不壞的土叔 我叫張陵房待,是天一觀的道長。 經(jīng)常有香客問我,道長桑孩,這世上最難降的妖魔是什么拜鹤? 我笑而不...
    開封第一講書人閱讀 56,780評(píng)論 1 285
  • 正文 為了忘掉前任,我火速辦了婚禮流椒,結(jié)果婚禮上敏簿,老公的妹妹穿的比我還像新娘。我一直安慰自己宣虾,他們只是感情好惯裕,可當(dāng)我...
    茶點(diǎn)故事閱讀 65,890評(píng)論 6 385
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著绣硝,像睡著了一般蜻势。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上鹉胖,一...
    開封第一講書人閱讀 50,084評(píng)論 1 291
  • 那天握玛,我揣著相機(jī)與錄音,去河邊找鬼次员。 笑死败许,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的淑蔚。 我是一名探鬼主播市殷,決...
    沈念sama閱讀 39,151評(píng)論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼刹衫!你這毒婦竟也來了醋寝?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 37,912評(píng)論 0 268
  • 序言:老撾萬榮一對(duì)情侶失蹤带迟,失蹤者是張志新(化名)和其女友劉穎音羞,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體仓犬,經(jīng)...
    沈念sama閱讀 44,355評(píng)論 1 303
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡嗅绰,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,666評(píng)論 2 327
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了搀继。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片窘面。...
    茶點(diǎn)故事閱讀 38,809評(píng)論 1 341
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖叽躯,靈堂內(nèi)的尸體忽然破棺而出财边,到底是詐尸還是另有隱情,我是刑警寧澤点骑,帶...
    沈念sama閱讀 34,504評(píng)論 4 334
  • 正文 年R本政府宣布酣难,位于F島的核電站谍夭,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏憨募。R本人自食惡果不足惜紧索,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 40,150評(píng)論 3 317
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望馋嗜。 院中可真熱鬧齐板,春花似錦吵瞻、人聲如沸葛菇。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,882評(píng)論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽眯停。三九已至,卻和暖如春卿泽,著一層夾襖步出監(jiān)牢的瞬間莺债,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,121評(píng)論 1 267
  • 我被黑心中介騙來泰國打工签夭, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留齐邦,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 46,628評(píng)論 2 362
  • 正文 我出身青樓第租,卻偏偏與公主長得像措拇,于是被迫代替她去往敵國和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子慎宾,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 43,724評(píng)論 2 351