mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 09:35:28 +03:00
4f75591060
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
25 lines
712 B
PHP
25 lines
712 B
PHP
<?php
|
|
|
|
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';
|
|
|
|
public function collectData()
|
|
{
|
|
$this->collectExpandableDatas('https://listverse.com/feed/', 15);
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|