diff --git a/src/HttpClient/HttpClient.php b/src/HttpClient/HttpClient.php index a23923b..c7bf8aa 100644 --- a/src/HttpClient/HttpClient.php +++ b/src/HttpClient/HttpClient.php @@ -161,7 +161,7 @@ public function getRequestPromise(Request $request): PromiseInterface } return $this->client - ->sendAsync($request->getPsrRequest(), $request->getOptions()) + ->sendAsync($request->getPsrRequest(), $options) ->then(function (ResponseInterface $response) use ($request, $cacheKey, $options) { $parseResult = $request->getParseHandler()($request->getPsrRequest(), $response, $options); if ($cacheKey !== null && $parseResult !== null) { diff --git a/src/Model/AppInfo.php b/src/Model/AppInfo.php index d8b33e8..e696375 100644 --- a/src/Model/AppInfo.php +++ b/src/Model/AppInfo.php @@ -167,9 +167,9 @@ public function getDeveloperName(): ?string /** * Returns a summary of the application. * - * @return string summary of the application + * @return string|null summary of the application */ - public function getSummary(): string + public function getSummary(): ?string { return $this->summary; } diff --git a/src/Scraper/AppInfoScraper.php b/src/Scraper/AppInfoScraper.php index 59bcbf3..b843f35 100644 --- a/src/Scraper/AppInfoScraper.php +++ b/src/Scraper/AppInfoScraper.php @@ -72,7 +72,7 @@ public function __invoke(RequestInterface $request, ResponseInterface $response, $country = $query[GPlayApps::REQ_PARAM_COUNTRY] ?? GPlayApps::DEFAULT_COUNTRY; $name = $appInfo[0][0]; - $description = ScraperUtil::html2text($appInfo[72][0][1]); + $description = ScraperUtil::html2text($appInfo[12][0][0][1] ?? $appInfo[72][0][1]); $developer = $this->extractDeveloper($appInfo); $category = $this->extractCategory($appInfo[79][0][0] ?? []); @@ -110,7 +110,7 @@ public function __invoke(RequestInterface $request, ResponseInterface $response, $cover = $this->extractCover($appInfo); $screenshots = $this->extractScreenshots($appInfo); $video = $this->extractVideo($appInfo); - $contentRating = $appInfo[111][1] ?? ''; + $contentRating = $appInfo[9][0] ?? ''; $released = $this->convertDate($appInfo[10][1][0] ?? null); $updated = $this->convertDate($appInfo[145][0][1][0] ?? null); $recentChanges = $this->extractRecentChanges($appInfo);