2019-10-03 23:24:14 +03:00
|
|
|
<?php
|
|
|
|
|
2022-07-01 16:10:30 +03:00
|
|
|
class ListverseBridge extends FeedExpander
|
|
|
|
{
|
|
|
|
const MAINTAINER = 'IceWreck';
|
|
|
|
const NAME = 'Listverse Bridge';
|
|
|
|
const URI = 'https://listverse.com/';
|
|
|
|
const CACHE_TIMEOUT = 3600;
|
|
|
|
const DESCRIPTION = 'RSS feed for Listverse';
|
2019-10-03 23:24:14 +03:00
|
|
|
|
2022-07-01 16:10:30 +03:00
|
|
|
public function collectData()
|
|
|
|
{
|
|
|
|
$this->collectExpandableDatas('https://listverse.com/feed/', 15);
|
|
|
|
}
|
2019-10-03 23:24:14 +03:00
|
|
|
|
2022-07-01 16:10:30 +03:00
|
|
|
protected function parseItem($newsItem)
|
|
|
|
{
|
|
|
|
$item = parent::parseItem($newsItem);
|
|
|
|
// $articlePage gets the entire page's contents
|
|
|
|
$articlePage = getSimpleHTMLDOM($newsItem->link);
|
|
|
|
$article = $articlePage->find('#articlecontentonly', 0);
|
|
|
|
$item['content'] = $article;
|
|
|
|
return $item;
|
|
|
|
}
|
2019-10-03 23:24:14 +03:00
|
|
|
}
|