Skip to content

Commit

Permalink
修复解析失败 #10
Browse files Browse the repository at this point in the history
  • Loading branch information
5ime authored Jul 1, 2022
1 parent f433c4a commit e55d1aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package Lanzou_API
* @author iami233
* @version 1.4.0
* @version 1.5.0
* @link http://github.com/5ime/Lanzou_api
*/
header('Access-Control-Allow-Origin:*');
Expand Down Expand Up @@ -38,18 +38,21 @@
preg_match('/发布者:<\\/span>(.*?)<span class=\\"mt2\\">/', $lanzou, $author);
preg_match('/var domianload = \'(.*?)\'/', $lanzou, $domain);
if(empty($domain[1])){
preg_match('/submit.href = \'(.*?)\'/', $lanzou, $domain);
preg_match('/var ccct = \'(.*?)\'/', $lanzou, $domain);
}
preg_match('/domianload \+ \'(.*?)\'/', $lanzou, $down2);
preg_match('/var downloads = \'(.*?)\'/', $lanzou, $down3);
preg_match('/var oreferr = \'(.*?)\'/', $lanzou, $down4);
if(empty($down3[1])){
preg_match('/var loaddown = \'(.*?)\'/', $lanzou, $down3);
}
preg_match('/<div class=\\"md\\">(.*?)<span class=\\"mtt\\">\\((.*?)\\)<\\/span><\\/div>/', $lanzou, $size);
if (!empty($down2)){
$download = getRedirect($domain[1] . $down2[1]);
}else{
}elseif (!empty($down3)) {
$download = getRedirect($domain[1] . $down3[1]);
}else{
$download = getRedirect($domain[1] . $down4[1]);
}
if (strpos($lanzou,'请使用IOS自带浏览器safari下载')){
preg_match('/var nmousedows = \'(.*?)url=(.*?)\'/', $lanzou, $down);
Expand Down

0 comments on commit e55d1aa

Please sign in to comment.