2014-05-31 14:39:35 +04:00
|
|
|
<?php
|
2016-09-14 14:33:38 +03:00
|
|
|
class Rue89Bridge extends FeedExpander {
|
2015-11-05 14:20:11 +03:00
|
|
|
|
2016-08-30 12:23:55 +03:00
|
|
|
const MAINTAINER = "pit-fgfjiudghdf";
|
|
|
|
const NAME = "Rue89";
|
|
|
|
const URI = "http://rue89.nouvelobs.com/";
|
|
|
|
const DESCRIPTION = "Returns the 5 newest posts from Rue89 (full text)";
|
2015-11-05 14:20:11 +03:00
|
|
|
|
2016-09-14 14:33:38 +03:00
|
|
|
protected function parseItem($item){
|
|
|
|
$item = parent::parseItem($item);
|
2016-06-22 00:33:51 +03:00
|
|
|
|
2016-09-14 14:33:38 +03:00
|
|
|
$url = "http://api.rue89.nouvelobs.com/export/mobile2/node/" . str_replace(" ", "", substr($item['uri'], -8)) . "/full";
|
2016-09-26 00:22:33 +03:00
|
|
|
$datas = json_decode(getContents($url), true);
|
2016-09-14 14:33:38 +03:00
|
|
|
$item['content'] = $datas['node']['body'];
|
2016-06-22 00:33:51 +03:00
|
|
|
|
2016-09-14 14:33:38 +03:00
|
|
|
return $item;
|
2015-01-30 21:56:55 +03:00
|
|
|
}
|
|
|
|
|
2016-08-25 02:24:53 +03:00
|
|
|
public function collectData(){
|
2016-09-14 14:33:38 +03:00
|
|
|
$this->collectExpandableDatas('http://api.rue89.nouvelobs.com/feed');
|
2014-05-31 14:39:35 +04:00
|
|
|
}
|
|
|
|
}
|