diff --git a/bridges/HackerNewsUserThreadsBridge.php b/bridges/HackerNewsUserThreadsBridge.php index 0ab7445db251..5f466f9f1604 100644 --- a/bridges/HackerNewsUserThreadsBridge.php +++ b/bridges/HackerNewsUserThreadsBridge.php @@ -40,7 +40,10 @@ public function collectData() $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; }