collectExpandableDatas('https://www.thedrive.com/feed', 20);
}
protected function parseItem($feedItem)
{
$item = parent::parseItem($feedItem);
//remove warzone articles
if (str_contains($item['uri'], 'the-war-zone')) {
return null;
}
//the first image in the article is an attachment for some reason
foreach ($item['enclosures'] as $attachment) {
$item['content'] = '' . $item['content'];
}
$item['enclosures'] = [];
//make youtube videos clickable
$html = str_get_html($item['content']);
foreach ($html->find('div.lazied-youtube-frame') as $youtubeVideoDiv) {
$videoID = $youtubeVideoDiv->getAttribute('data-video-id');
//place around the