Skip to content

Commit

Permalink
各评分人数
Browse files Browse the repository at this point in the history
  • Loading branch information
xhboke committed Jan 6, 2022
1 parent 8ca613e commit eaef8cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extend/DouBanLib/MovieInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function getAll(bool $isAccurate, bool $is_play_url = True): array
$this->All['Region'] = $this->get_region();
$this->All['Other_name'] = $this->get_OtherName();
$this->All['Rating'] = $this->getRating();
$this->All['RatingPeople'] = $this->getRatingPeople();
$this->All['Votes'] = $this->getVotes();
$this->All['Description'] = $this->getDescription();
$this->All['Episode'] = $this->getEpisode();
Expand Down Expand Up @@ -368,6 +369,17 @@ public function get_region(): string
return $this->region;
}

/**
* 获取各评分人数
* @access public
* @return array
*/
public function getRatingPeople(): array
{
$this->RatingPeople = $this->preg('#<span class="rating_per">([\s\S]*?)<\/span>#', $this->data, 1);
return $this->RatingPeople;
}

/**
* 获取影片播放链接
* @access public
Expand Down

0 comments on commit eaef8cc

Please sign in to comment.