forked from blallo/rss-bridge
[DansTonChatBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
ebe7084cc2
commit
c9d89aface
1 changed files with 3 additions and 4 deletions
|
@ -3,14 +3,13 @@ class DansTonChatBridge extends BridgeAbstract{
|
||||||
|
|
||||||
public $maintainer = "Astalaseven";
|
public $maintainer = "Astalaseven";
|
||||||
public $name = "DansTonChat Bridge";
|
public $name = "DansTonChat Bridge";
|
||||||
public $uri = "http://danstonchat.com";
|
public $uri = "http://danstonchat.com/";
|
||||||
public $description = "Returns latest quotes from DansTonChat.";
|
public $description = "Returns latest quotes from DansTonChat.";
|
||||||
|
|
||||||
public function collectData(){
|
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) {
|
foreach($html->find('div.item') as $element) {
|
||||||
$item = array();
|
$item = array();
|
||||||
|
|
Loading…
Reference in a new issue