1
0
Fork 0
forked from blallo/rss-bridge

[DansTonChatBridge] code simplification

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-28 13:50:46 +02:00
parent ebe7084cc2
commit c9d89aface

View file

@ -3,14 +3,13 @@ class DansTonChatBridge extends BridgeAbstract{
public $maintainer = "Astalaseven";
public $name = "DansTonChat Bridge";
public $uri = "http://danstonchat.com";
public $uri = "http://danstonchat.com/";
public $description = "Returns latest quotes from DansTonChat.";
public function collectData(){
$html = '';
$link = 'http://danstonchat.com/latest.html';
$html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request DansTonChat.');
$html = $this->getSimpleHTMLDOM($this->uri.'latest.html')
or $this->returnServerError('Could not request DansTonChat.');
foreach($html->find('div.item') as $element) {
$item = array();