bridges: use BridgeAbstract::getSimpleHTMLDOM

instead of BridgeAbstract::file_get_html

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-07-08 19:06:35 +02:00
parent f43bbda83e
commit 3c0d13c1bb
121 changed files with 1212 additions and 396 deletions

View file

@ -32,7 +32,7 @@ class FourchanBridge extends BridgeAbstract{
$this->returnClientError('You must specify the thread URL.');
$url = 'https://boards.4chan.org'.$thread['path'].'';
$html = $this->file_get_html($url) or $this->returnServerError("Could not request 4chan, thread not found");
$html = $this->getSimpleHTMLDOM($url) or $this->returnServerError("Could not request 4chan, thread not found");
foreach($html->find('div.postContainer') as $element) {
$item = new \Item();
@ -59,7 +59,7 @@ class FourchanBridge extends BridgeAbstract{
}
$this->items = array_reverse($this->items);
}
public function getCacheDuration(){
return 300; // 5min
}