Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
xhboke committed Jan 6, 2022
1 parent eaef8cc commit b68c0d1
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions extend/DouBanLib/MovieTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,20 @@ static public function getTop250($page): array
$_data = parent::curl_get($_url);
$_ = parent::preg('#<em class="">([\s\S]*?)<\/em>([\s\S]*?)<a href="https:\/\/movie.douban.com\/subject\/([\s\S]*?)\/">([\s\S]*?)<img width="100" alt="([\s\S]*?)" src="([\s\S]*?)" class="">#', $_data, 0);
$_rank = parent::preg('#<span class="rating_num" property="v:average">([\s\S]*?)<\/span>#', $_data, 1);
try {
$_count = count($_[0]);
$_return = [];
if ($_count) {
for ($i = 0; $i < $_count; $i++) {
$_return[$i]['em'] = $_[1][$i];
$_return[$i]['id'] = $_[3][$i];
$_return[$i]['name'] = $_[5][$i];
$_return[$i]['rank'] = $_rank[$i];
$_return[$i]['img'] = $_[6][$i];
}
} else {
$_return = [];
$_count = parent::getCount($_[0]);
$_return = [];
if ($_count) {
for ($i = 0; $i < $_count; $i++) {
$_return[$i]['em'] = $_[1][$i];
$_return[$i]['id'] = $_[3][$i];
$_return[$i]['name'] = $_[5][$i];
$_return[$i]['rank'] = $_rank[$i];
$_return[$i]['img'] = $_[6][$i];
}
return $_return;
} catch (\Throwable $th) {
return [];
} else {
$_return = [];
}
return $_return;
}

static public function getIndexMovie($MovieType = '热门', $MovieSort = 'recommend', $page_limit = '24', $page = 1): string
Expand Down

0 comments on commit b68c0d1

Please sign in to comment.