快手, 短视, 短视频, 视频, 无水
整个思路就是获取分享链接302跳转后url的源码取出视频链接和相关信息就行了 以下是PHP完整具体代码如下(请自行套前端css样式): logo.png 名站网址导航提供 名站网址导航 2019-3-4 20:56 名站分类目录 <?php$url = @$_GET['url'];$url = head($url);$urlid = GetBetween($url,'https://live.kuaishou.com/u/','?fid');$urlid = GetBetween($urlid,'/','/');$datas = get($url);$data = GetBetween($datas,$urlid,'false}');$id = GetBetween($data,'newWatermark\u002F','.');$surl = 'https://txmov2.a.yximgs.com/bs2/newWatermark/'.$id.'.mp4';$name = GetBetween($data,'jpg","name":"','"');$txt = GetBetween($data,'caption":"','"');$namejpg = GetBetween($datas,'profile":"https:', '"');$namejpg = unicodeDecode($namejpg);$namejpg = 'https:'.$namejpg;$videoimg = GetBetween($data,'thumbnailUrl":"', '"');$videoimg = unicodeDecode($videoimg);if (strstr($url,"kuaishou.com")) {echo '<div class="shuchu">(长时间没有反应,请刷新页面或重新输入地址)<br>解析结果:<br><HR>分享用户:'.$name.'<HR><img src="'.$namejpg.'" height="200" width="200"/><HR>分享说明:'. $txt.'<HR>';$time = date('YmdHis');echo '视频地址: <textarea readonly="readonly" cols="100%" rows="1" id="biao1"style="color:#666;background-color: #ffffff00;text-align: center;margin-top: 10px;">'.$surl.'</textarea><a href="'.$surl.'"target="_blank"style=" color:#666;">播放</a><a href="'.$surl.'"target="_blank"style=" color:#666;"download="快手_'.$name.'_'.$time.'">下载</a><a href="javascript:void(0);"style=" color:#666;">复制链接</a><br><hr>在线播放:<hr><div style="text-align: center;"><video id="video_img" poster="'.$videoimg.'" controls="controls" ><source id="video_src" src="'.$surl.'" type="video/mp4"></video></div><HR></div>';} else{echo '<div class="shuchu">请输入快手分享的地址,如:http://www.gifshow.com/s/s8FmE7gO';//echo '<script type="text/javascript">alert("请输入快手分享的地址,如:http://www.gifshow.com/s/s8FmE7gO");</script>';}function head($url){$header = get_headers($url,1);if (strpos($header[0],'301') || strpos($header[0],'302')) {if(is_array($header['Location'])) {$info = $header['Location'][count($header['Location'])-1]; }else{$info = $header['Location'];}}return $info;}function GetBetween($content,$start,$end) {$r = explode($start, $content);if (isset($r[1])) {$r = explode($end, $r[1]);return $r[0];}return '';}function unicodeDecode($name) {$json = '{"str":"'.$name.'"}';$arr = json_decode($json,true);if (empty($arr)) return '';return $arr['str'];}function get($url) {$user_agent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';$ch = curl_init();curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);curl_setopt($ch, CURLOPT_URL, $url);$output = curl_exec($ch);curl_close($ch);return $output;}?> 抖音无水印短视频在线解析源码 一键解析抖音视频文件还... https://m.名站网址导航.com/forum.php?mod=viewthread&tid=1787 (出处: 名站网址导航) |
解决Navicat 报错:1130-host is not allowed MySQL不允许从远程访问...