mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 01:55:21 +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:
parent
f43bbda83e
commit
3c0d13c1bb
121 changed files with 1212 additions and 396 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue