From dc5aea8ad9410c4a26e65012e33f118930c14096 Mon Sep 17 00:00:00 2001 From: Irfan Date: Fri, 1 Oct 2021 19:35:32 +0500 Subject: [PATCH] Fix people pictures and return only single image size --- src/MyAnimeList/MalClient.php | 2 +- src/Request/Person/PersonPicturesRequest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MyAnimeList/MalClient.php b/src/MyAnimeList/MalClient.php index 3fb41fdf..4347ca6b 100644 --- a/src/MyAnimeList/MalClient.php +++ b/src/MyAnimeList/MalClient.php @@ -400,7 +400,7 @@ public function getPersonPictures(Request\Person\PersonPicturesRequest $request) { $crawler = $this->ghoutte->request('GET', $request->getPath()); try { - $parser = new Parser\Common\PicturesPageParser($crawler); + $parser = new Parser\Common\DefaultPicturesPageParser($crawler); return $parser->getModel(); } catch (\Exception $e) { diff --git a/src/Request/Person/PersonPicturesRequest.php b/src/Request/Person/PersonPicturesRequest.php index d61e8473..0850ec22 100644 --- a/src/Request/Person/PersonPicturesRequest.php +++ b/src/Request/Person/PersonPicturesRequest.php @@ -32,6 +32,6 @@ public function __construct(int $id) public function getPath(): string { // MyAnimeList wants after //... it happily accepts jikan as a valid parameter though - return sprintf('https://myanimelist.net/people/%d/jikan/pictures', $this->id); + return sprintf('https://myanimelist.net/people/%d/jikan/pics', $this->id); } }