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