diff --git a/src/Parser/Manga/MangaParser.php b/src/Parser/Manga/MangaParser.php index 83bda7d8..efc60bfb 100644 --- a/src/Parser/Manga/MangaParser.php +++ b/src/Parser/Manga/MangaParser.php @@ -91,11 +91,17 @@ public function getMangaImageURL(): string */ public function getMangaSynopsis(): ?string { - $synopsis = JString::cleanse( - $this->crawler->filterXPath('//meta[@property=\'og:description\']')->attr('content') - ); + // #justMALThings: anime synopsis is wrapped in

whereas it's for manga + $node = $this->crawler->filterXPath('//span[@itemprop=\'description\']'); + + if (!$node->count()) { + return null; + } + + $synopsis = JString::cleanse($node->html()); - return preg_match('~^Looking for information on the manga~', $synopsis) ? null : $synopsis; + // just in case + return str_starts_with($synopsis, 'No synopsis information has been added to this title.') ? null : $synopsis; } /**