find('.col');
// Removing first element because it's a "load more" button
array_shift($articles);
foreach ($articles as $article) {
$item = [];
$article_title = $article->find('h3', 0)->plaintext;
$article_content = $article->find('p', 0)->plaintext;
$article_cover = $article->find('img', 0)->src;
// If there is a cover, add it to the content
if (!empty($article_cover)) {
$article_cover = '
';
$article_content = $article_cover . $article_content;
}
$item['uri'] = $article->find('a', 0)->href;
$item['title'] = $article_title;
$item['content'] = $article_content;
$item['enclosures'] = [$article_cover];
$item['timestamp'] = $article->find('span', 0)->plaintext;
$this->items[] = $item;
}
}
}