-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬 这个报错怎么回事,麻烦看一下啊!! #57
Comments
91porn_php/detailPage.php |
`<?php function random_ip() function singlePage($page_url, $title)
echo $videoUrl."\n";
} function getHtml($url) {
} function decode($cipher) function download($videoUrl, $title) { function checkExist($title) {
} if (count($argv)>1) { 修改哪个呢!可否标注出来!谢谢啦!` |
first('#player_one source');
if ($source) {
$videoUrl = $source->getAttribute('src');
echo "====直接解析====\n";
}
// 分享链接也没有的话再解密
if (!$videoUrl) {
$cipher = $page->first('#player_one script')->text();
$videoUrl = decode($cipher);
echo "====js解密====\n";
}
// 如果source取不到就找分享链接
if (!$videoUrl) {
$shareLink = $page->first('#linkForm2 #fm-video_link');
$sharePage = new Document(getHtml($shareLink->text()));
$videoUrl = $sharePage->first('source')->getAttribute('src');
echo "====分享链接====\n";
}
$date = $page->find('//*[@id="videodetails-content"]/span[2]', Query::TYPE_XPATH)[0]->text();
echo $videoUrl."\n";
download($videoUrl, $title);
}catch(Exception $e) {
echo "这个视频没找到,请排查是否需要挂载代理\n";
}
}
function getHtml($url) {
$header = array();
$header[] = "Accept-Language:zh-CN,zh;q=0.9";
$header[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)Chrome/51.0.2704.106 Safari/537.36";
$header[] = "X-Forwarded-For:".random_ip();
$header[] = "Content-Type: multipart/form-data; session_language=cn_CN";
$header[] = "Referer:".$url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT,300);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
if (property_exists('Config', 'proxy') && (Config::$url=='91porn.com')) {
curl_setopt($ch, CURLOPT_PROXY, Config::$proxy);
}
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
function decode($cipher)
{
$js = file_get_contents('https://91porn.com/js/md5.js');
$file = fopen('./md5.js',"w+");
fputs($file,$js.'console.log(strencode(process.argv[2], process.argv[3], process.argv[4]));');//写入文件
fclose($file);
$cipher = substr($cipher, 55);
$cipher = substr($cipher, 0, strlen($cipher)-19);
$cipher = str_replace('","', ' ', $cipher);
$tag = shell_exec('node ./md5.js '.$cipher);
$videoUrl = explode(" |
`<?php function random_ip() function singlePage($page_url, $title)
} function getHtml($url) {
} function decode($cipher) function download($videoUrl, $title) { function checkExist($title) {
} if (count($argv)>1) { |
前后`去掉就可以了 |
@kuckyhappy |
Fatal error: Uncaught Error: Call to a member function text() on null in /root/91porn/detailPage.php:32
Stack trace:
#0 /root/91porn/91all.php(23): singlePage('http://627.work...', '\xE6\x8A\x8A\xE5\xB0\x8F\xE5\xB0\x91\xE5\xA6\x87\xE8\x8D\x89...')
#1 /root/91porn/91all.php(35): listPage('http://627.work...', 1, 10)
#2 {main}
thrown in /root/91porn/detailPage.php on line 32
The text was updated successfully, but these errors were encountered: