Rss-Bridge/bridges/Rue89Bridge.php

23 lines
657 B
PHP
Raw Normal View History

<?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);
2016-06-21 23:33:51 +02:00
$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'];
2016-06-21 23:33:51 +02:00
return $item;
2015-01-30 19:56:55 +01:00
}
public function collectData(){
$this->collectExpandableDatas('http://api.rue89.nouvelobs.com/feed');
}
}