[ListverseBridge - add new bridge (#1305)
This commit is contained in:
parent
2a3d5865ad
commit
8c19146d29
1 changed files with 22 additions and 0 deletions
22
bridges/ListverseBridge.php
Normal file
22
bridges/ListverseBridge.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue