forked from blallo/rss-bridge
f1fb95b257
- returnError, returnServerError, returnClientError ,debugMessage are moved to lib/error.php - getContents, getSimpleHTMLDOM, getSimpleHTMLDOMCached are moved to lib/contents.php Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
22 lines
657 B
PHP
22 lines
657 B
PHP
<?php
|
|
class Rue89Bridge extends FeedExpander {
|
|
|
|
const MAINTAINER = "pit-fgfjiudghdf";
|
|
const NAME = "Rue89";
|
|
const URI = "http://rue89.nouvelobs.com/";
|
|
const DESCRIPTION = "Returns the 5 newest posts from Rue89 (full text)";
|
|
|
|
protected function parseItem($item){
|
|
$item = parent::parseItem($item);
|
|
|
|
$url = "http://api.rue89.nouvelobs.com/export/mobile2/node/" . str_replace(" ", "", substr($item['uri'], -8)) . "/full";
|
|
$datas = json_decode(getContents($url), true);
|
|
$item['content'] = $datas['node']['body'];
|
|
|
|
return $item;
|
|
}
|
|
|
|
public function collectData(){
|
|
$this->collectExpandableDatas('http://api.rue89.nouvelobs.com/feed');
|
|
}
|
|
}
|