tagの各要素をtrim()する
This commit is contained in:
parent
16ed4482f4
commit
dc0eb0a548
@ -37,7 +37,13 @@ class XtubeResolver implements Resolver
|
|||||||
$metadata->description = trim($crawler->filter('.fullDescription ')->text(''));
|
$metadata->description = trim($crawler->filter('.fullDescription ')->text(''));
|
||||||
$metadata->image = str_replace('m=eSuQ8f', 'm=eaAaaEFb', $metadata->image);
|
$metadata->image = str_replace('m=eSuQ8f', 'm=eaAaaEFb', $metadata->image);
|
||||||
$metadata->image = str_replace('240X180', 'original', $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;
|
return $metadata;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user