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::Like => "Liked this post",
 | 
				
			||||||
            MentionType::Reply => $document->innerText(),
 | 
					            MentionType::Reply => $document->innerText(),
 | 
				
			||||||
            MentionType::Repost => "Reposted this post",
 | 
					            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)
 | 
					        if ($card)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            $name = $card->filter('.p-name')?->text();
 | 
					            $name = $card->filter('.p-name')?->text("");
 | 
				
			||||||
            $url = $card->filter('.u-url')?->text();
 | 
					            $url = $card->filter('.u-url')?->text("");
 | 
				
			||||||
            $photo = $card->filter('.u-photo')?->attr('src');
 | 
					            $photo = $card->filter('.u-photo')->count() ? $card->filter('.u-photo')->attr('src') : "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return implode(", ", [$name, $url, $photo]);
 | 
					            return implode(", ", [$name, $url, $photo]);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user