pk10计划软件手机苹果

Researched the principle of Youku VIP video analysis overnight

2019-04-18 20:15 Column: Industry dynamics view ( )

Recently, a friend wanted to do video parsing, so Baidu took a look. The video parsing interface has been bad, but I bought VIP for a long time with infinite love for technology and silly. I analyzed Youku video, VIP video parsing website and software overnight. , You only need to paste the video address or open the video website in the app to watch it for free, and the ads are automatically skipped. So how does the video parsing interface work? Every major video on the market has a web version and an app version. No matter what version you need to communicate with the server, we can imitate this process, add or delete the verification link, or imitate the fake verification link. Before that, we need to get the playback address of the video

The link below is the watch page of Integrity.

http://v.youku.com/v_show/id_XNDEwNTI2ODIwNA==.html?spm=a2ha1.12528442.m_4424_c_11054_1.d_01
/v.swf个链接 In the play page we found http://player.youku.com/player.php/sid/ XNDEwNTI2ODIwNA == /v.swf links

XNDEwNTI2ODIwNA == is the key point, we create a new html file to call this flash file, the code is as follows

<html>
<head>
</ head>
<body>
<embed src = "http://player.youku.com/player.php/sid/XNDEwNTI2ODIwNA==/v.swf" quality = "high" width = "480" height = "400" align = "middle" allowAccess = "sameDomain" type = "application / x-shockwave-flash"> </ embed>
</ body>
<html>
Play successfully, as shown

&ccode=0405&client_ip=192.168.1.1&utid=vqBmFN3TJh8CARsUWyRy%252FG%252FR&client_ts=1553444878&r=TJXNtWdcb6ky%2FowezfVSuQGxyYIsU6VnDzrdvUawMI4=&needbf=1&site=1&p=1&fu=0&wintype=BDskin&vs=1.0&rst=flv&dq=auto&os=Windows&osv=10&d=0&bt=pc&aw=w&partnerid=0edbfd2e4fc91b72&refer= 地址 The browser requested an http://ups.youku.com/ups/get.json?vid= XNDEwNTI2ODIwNA == & ccode = 0405 & client_ip = 192.168.1.1 & utid = vqBmFN3TJh8CARsUWyRy% 252FG% 252FR & client_ts = 1553444878 & r = TJXNtUvzyfw6bw6b6 = 1 & p = 1 & fu = 0 & wintype = BDskin & vs = 1.0 & rst = flv & dq = auto & os = Windows & osv = 10 & d = 0 & bt = pc & aw = w & partnerid = 0edbfd2e4fc91b72 & refer = address

The connection has 6 parameters: vid, ccode, ckey, client_ip, utid, client_ts

.html?spm=a2ha1.12528442.m_4424_c_11054_1.d_01 We analyze the video address: http://v.youku.com/v_show/id_ XNDEwNTI2ODIwNA == .html? Spm = a2ha1.12528442.m_4424_c_11054_1.d_01

Among them: vid is the address of the video. Red part: XNDUxNDcxMTU2, ccode is fixed at 405. Tested 3 VIP videos. No other client_ip was found. Fill in the IP of your computer. Baidu search the IP to get utid. I blindly changed and can access client_ts. It is the timestamp in Google. Or 360 browser, press f12 and enter Date.parse (new Date ());

Via get request = 1 & fu = 0 & wintype = BDskin & vs = 1.0 & rst = flv & dq = auto & os = Windows & osv = 10 & d = 0 & bt = pc & aw = w & partnerid = 0edbfd2e4fc91b72 & refer =
Will get a very long json

Analyze json using json format tool

Video information:

Video likes and dislikes:

This is to tell the player what language version of the video needs to be played:

This part is the highlight of the video:


The next big thing is

There are 3 branches in the stream:

Where each branch represents a different clarity

http://pl-ali.youku.com/playlist/m3u8?vid=XNDEwNTI2ODIwNA==&type=mp4hd2v3&ups_client_netip=759986b9&utid=vqBmFN3TJh8CARsUWyRy%252FG%252FR&ccode=0405&psid=ab3e623a1f4f9d99fac7918a1b7a43d2&duration=6843&expire=18000&drm_type=1&drm_device=0&ups_ts=1553445993&onOff=0&encr= 0 & ups_key = 649b983c9cb182dd95caf6b4819dd97b

The parameter content is simple and easy to understand and will not be introduced one by one.


Among them stream_type: "mp4hd2" stream_type: mp4hd2 stands for ultra clear, flvhd high definition, mp4hd stands for standard definition

In segs is the detailed data of each segment of the video and the cdn address:

Open the cdn address directly to download the video segment

If you want to get the real address of the video, download the m3u8 file directly and open it with notepad ++

You can see that this is a 10-minute shard file

http://vali.cp31.ott.cibntv.net/657385D6FD940719ED0983E47/03000B23015C93313A4370F05CF07D26EA6022-5072-4928-B40C-A10B1ED0B27D.mp4?ccode=0405&duration=196&expire=18000&psid=ab3e623a1f4f9d99fac7918a1b7a43d2&ups_client_netip=759986b9&ups_ts=1553445993&ups_userid=&utid=vqBmFN3TJh8CARsUWyRy%252FG%252FR&vid= XNDEwNTI2ODIwNA% 3D% 3D & vkey = A0cc870e2503388cd57493748907f0660 & s = 7448b21d805a472eb6dd & sp =

Removed parameters: http://vali.cp31.ott.cibntv.net/657385D6FD940719ED0983E47/03000B23015C93313A4370F05CF07D26EA6022-5072-4928-B40C-A10B1ED0B27D.mp4 is the real download address of the video

Get the address that can be played as shown in the figure


Even a god, only the first and second addresses have, the third address is gone, which is embarrassing. It seems that you need to buy a VIP account to get all the addresses. . .
But this is easy to handle, we have already reached this step, we only need to buy a VIP number to serve everyone.

It's too late, I have to go to work tomorrow and I will just give ideas.

The idea is as follows:
Use selnium to simulate the user watching the video. When the app end user sends a video link, selnium uses Google to open the link, grab the final segs data and m3u8_url data, return it to the server, cache it, and return it to the app. See can return the cached data directly.
There are three ways to provide services here. One is to directly provide the mp4 address to the client app. The app adds the mp4 to the queue to download and play. The other solution is to directly download the mp4 on the server and provide playback through the m3u8 protocol. The other is directly This solution for Youku's m3u8_url address may or may not require login status. You can try it.

Other major video websites can also use this method to analyze and analyze.

I wo n’t buy VIP, just use someone ’s url, and you can watch it on the phone by packing an app. The download address is here http://t.cn/EJOQFfO
This article is for study and research use only. Do not use it for illegal purposes.




Dajiangyun Network Technology-Provide you with website construction, app development, applet development, advertising production, video production, advertising, seo optimization, website promotion
Scan the QR code to communicate with the project manager

We look forward to your voice on WeChat for 24 hours

Answer questions in this article / Technical consultation / Operational consultation / Technical advice / Internet communication

Zheng Mingming reiterates: Any unit or individual outside Dajiang Cloud Network Technology shall not use this case as a successful job demonstration!