From eaef8ccf8dd62976316ce250e9f6f054eb6b1e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=B0=8F=E8=88=AA?= Date: Thu, 6 Jan 2022 23:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E8=AF=84=E5=88=86=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/DouBanLib/MovieInfo.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/extend/DouBanLib/MovieInfo.php b/extend/DouBanLib/MovieInfo.php index 8b94ad9..41effe6 100644 --- a/extend/DouBanLib/MovieInfo.php +++ b/extend/DouBanLib/MovieInfo.php @@ -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(); @@ -368,6 +369,17 @@ public function get_region(): string return $this->region; } + /** + * 获取各评分人数 + * @access public + * @return array + */ + public function getRatingPeople(): array + { + $this->RatingPeople = $this->preg('#([\s\S]*?)<\/span>#', $this->data, 1); + return $this->RatingPeople; + } + /** * 获取影片播放链接 * @access public