mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-10 02:26:37 +02:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user