恋恋影视是干什么的,我就不多说了,老司机路过…..嘿嘿
解析的是全部视频,不是1分钟限制的视频!
下面是全部的解析过程,目前仅支持下载,有想法的朋友可以考虑集成到ckplayer这种网页播放器上,嘿嘿。
js计算k2值
function yp() {
for (var b = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36",a = "Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"), d = !1, c = 0; c < a.length; c++)
if (0 < b.indexOf(a[c])) {
d = !0;
break;
}
return d
}
function rm(g) {
var n;
g = g || 32;
n = "";
for (var u = 0; g > u; u++)
n += "abcdefghijklmnpqrstuvwxyz1234567890".charAt(Math.floor(35 * Math.random()));
return n
}
function jk() {
var b = !1;
top.location != self.location && (b = !0);
return b
}
cookie="ut=1515066750; CNZZDATA1254066530=533698177-1515066750-%7C1515066750; 4e3d1709313c4bb2d082dbf152b415d20d512a9aaaebcdc1e4=yhw1293450054%7C1516351000%7Cim1rwj7EmqQRLmtOWMJJP9biElmofJYfArF1XeDaYZ5%7Cb3b631f76179d1aac49f8a7e47bbc3718ff5c2dd566420b2a986f7c00f372c1a; myloves[6390]=kl; myloves[12361]=kl; myloves[6290]=kl; myloves[12618]=kl; myloves[12620]=kl; myloves[14427]=kl; myloves[14421]=kl; yg=2; myloves[14442]=kl; myloves[9551]=kl; myloves[11687]=kl; myloves[14401]=kl; myloves[14431]=kl; myloves[14087]=kl; myloves[14447]=kl; yl=0; myloves[11552]=kl; myloves[13190]=kl; myloves[14445]=kl; myloves[9531]=kl; myloves[8646]=kl; myloves[12552]=kl; myloves[10143]=kl; myloves[11485]=kl; myloves[4333]=kl; myloves[13079]=kl; myloves[3619]=kl"
function W(b) {
var a, d = b + "=", c = cookie.match(";");
for (b = 0; b < c.length; b++) {
for (a = c[b]; " " == a.charAt(0); )
a = a.substring(1, a.length);
if (0 == a.indexOf(d))
return a.substring(d.length, a.length)
}
return null
}
function getdata() {
var i1 = W("ke")
rd1 = yp() ? i1 ? "m2" : "ms" : i1 ? "c2" : "cs";
data=rd1+(yp()?"":rm(8));
alert(data);
return data
}
js调用getdata()即可获得k2值。
php访问网页,获取资源域名及路径信息
$cookie="ut=1515066750; CNZZDATA1254066530=533698177-1515066750-%7C1515066750; 4e3d1709313c4bb2d082dbf152b415d20d512a9aaaebcdc1e4=yhw1293450054%7C1516351000%7Cim1rwj7EmqQRLmtOWMJJP9biElmofJYfArF1XeDaYZ5%7Cb3b631f76179d1aac49f8a7e47bbc3718ff5c2dd566420b2a986f7c00f372c1a; myloves[6390]=kl; myloves[12361]=kl; myloves[6290]=kl; myloves[12618]=kl; myloves[12620]=kl; myloves[14427]=kl; myloves[14421]=kl; yg=2; myloves[14442]=kl; myloves[9551]=kl; myloves[11687]=kl; myloves[14401]=kl; myloves[14431]=kl; myloves[14087]=kl; myloves[14447]=kl; yl=0; myloves[11552]=kl; myloves[13190]=kl; myloves[14445]=kl; myloves[9531]=kl; myloves[8646]=kl; myloves[12552]=kl; myloves[10143]=kl; myloves[11485]=kl; myloves[4333]=kl; myloves[13079]=kl; myloves[3619]=kl";
$videoname= explode("/",$videourl);
$k5= $videoname[count($videoname)-1];
//获取域名信息
$html1= curl_post($videourl, '',$cookie);
$t1 = mb_strpos($html1,$k5.'" type="');
$t2 = mb_strpos($html1,'" href="/'.$k5.'"');
$type= mb_substr($html1,$t1+strlen($k5)+8,$t2-$t1-strlen($k5)-8);
if($type!=''||$type!=null){
$vg='k';
}else{
$vg='d';
}
执行此段代码,将获得资源路径信息,如http://k.syasn.com/b/b834.mp4中的 k值 ,b值。
PHP获取k1、k3、k4、k6、k7值
$url = 'http://h.syasn.com/?n='.$k5.'&p=222222222';
$canshu =curl_post($url, '',$cookie);//获取参数
$canshu=mb_substr($canshu,0,strlen($canshu)-1);
$pie = explode(",", $canshu);
$canshuming=array();
for ($i=0; $i<count($pie); $i++) {
$cans = explode("=", $pie[$i]);
$asd =mb_substr($cans[1],1,strlen($cans[1])-2);
$canshuming[$i]=$asd;
}
//echo var_dump($canshuming);
//echo 'http://k.syasn.com/rs/'.$k5.'.mp4?k1='.$canshuming[0].'&k2=cs8u1091eq&k3='.$canshuming[1].'&k4='.$canshuming[2].'&k5='.$k5.'&k6='.$canshuming[3].'&k7='.$canshuming[4];
//$playerurl='';
$playerurl= 'http://'.$vg.'.syasn.com/'.$type.'/'.$k5.'.mp4?k1='.$canshuming[0].'%26k2='.$k2.'%26k3='.$canshuming[1].'%26k4='.$canshuming[2].'%26k5='.$k5.'%26k6='.$canshuming[3].'%26k7='.$canshuming[4];
最后得到的$playerurl就是最终地址,可以直接下载的哟。
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/242344.html
