[HackerNews] Fix tag containing comment

[HackerNews] Fix tag containing comment
This commit is contained in:
Matthieu Rakotojaona 2024-08-21 20:13:09 +02:00
parent 6c88f2c21e
commit df52fbc091

View File

@ -40,7 +40,10 @@ class HackerNewsUserThreadsBridge extends BridgeAbstract
$item['author'] = $author;
$item['title'] = $title;
$item['timestamp'] = $element->find('span[class*="age"]', 0)->find('a', 0)->innertext;
$item['content'] = $element->find('span[class*="commtext"]', 0)->innertext;
$contentDiv = $element->find('div[class*="commtext"]', 0);
if (!empty($contentDiv)) {
$item['content'] = $contentDiv->innertext;
}
$this->items[] = $item;
}