Only extract information inside h-entry microformat
This commit is contained in:
parent
2735abde64
commit
811f63a207
@ -104,7 +104,7 @@ class Endpoint {
|
||||
MentionType::Like => "Liked this post",
|
||||
MentionType::Reply => $document->innerText(),
|
||||
MentionType::Repost => "Reposted this post",
|
||||
MentionType::Mention => $document->closest('a[href="' . $target . '"]')->innerText()
|
||||
MentionType::Mention => $document->innerText(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -114,9 +114,9 @@ class Endpoint {
|
||||
|
||||
if ($card)
|
||||
{
|
||||
$name = $card->filter('.p-name')?->text();
|
||||
$url = $card->filter('.u-url')?->text();
|
||||
$photo = $card->filter('.u-photo')?->attr('src');
|
||||
$name = $card->filter('.p-name')?->text("");
|
||||
$url = $card->filter('.u-url')?->text("");
|
||||
$photo = $card->filter('.u-photo')->count() ? $card->filter('.u-photo')->attr('src') : "";
|
||||
|
||||
return implode(", ", [$name, $url, $photo]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user