rss-bridge/bridges/FierPandaBridge.php
logmanoriginal 15e6d77569 [FierPandaBridge] Fix bridge
This bridge now returns all articles from the front page, following
layout changes in the past.

References #679
2018-07-21 18:07:03 +02:00

29 lines
639 B
PHP

<?php
class FierPandaBridge extends BridgeAbstract {
const MAINTAINER = 'snroki';
const NAME = 'Fier Panda Bridge';
const URI = 'http://www.fier-panda.fr/';
const CACHE_TIMEOUT = 21600; // 6h
const DESCRIPTION = 'Returns latest articles from Fier Panda.';
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request Fier Panda.');
defaultLinkTo($html, static::URI);
foreach($html->find('article') as $article) {
$item = array();
$item['uri'] = $article->find('a', 0)->href;
$item['title'] = $article->find('a', 0)->title;
$this->items[] = $item;
}
}
}