array_mapのcallbackをシンプルにする
This commit is contained in:
parent
dc0eb0a548
commit
12fd228e75
@ -37,13 +37,7 @@ 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 =
|
$metadata->tags = array_map('trim', $crawler->filter('.tagsCategories a')->extract('_text'));
|
||||||
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