From dc0eb0a548b3efe7da3658f65f20f4a4de004024 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Mon, 4 Nov 2019 14:24:09 +0900 Subject: [PATCH] =?UTF-8?q?tag=E3=81=AE=E5=90=84=E8=A6=81=E7=B4=A0?= =?UTF-8?q?=E3=82=92trim()=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetadataResolver/XtubeResolver.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/MetadataResolver/XtubeResolver.php b/app/MetadataResolver/XtubeResolver.php index f2153ce..ed1e258 100644 --- a/app/MetadataResolver/XtubeResolver.php +++ b/app/MetadataResolver/XtubeResolver.php @@ -37,7 +37,13 @@ class XtubeResolver implements Resolver $metadata->description = trim($crawler->filter('.fullDescription ')->text('')); $metadata->image = str_replace('m=eSuQ8f', 'm=eaAaaEFb', $metadata->image); $metadata->image = str_replace('240X180', 'original', $metadata->image); - $metadata->tags = $crawler->filter('.tagsCategories a')->extract('_text'); + $metadata->tags = + array_map( + function ($text) { + return trim($text); + }, + $crawler->filter('.tagsCategories a')->extract('_text') + ); return $metadata; }