mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 10:04:54 +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
|
@ -82,7 +82,7 @@ class DauphineLibereBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
private function ExtractContent($url, $context) {
|
||||
$html2 = $this->file_get_html($url, false, $context);
|
||||
$html2 = $this->getSimpleHTMLDOM($url,false,$context);
|
||||
$text = $html2->find('div.column', 0)->innertext;
|
||||
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
|
||||
return $text;
|
||||
|
@ -102,10 +102,10 @@ class DauphineLibereBridge extends BridgeAbstract {
|
|||
|
||||
if (isset($param['u'])) { /* user timeline mode */
|
||||
$this->request = $param['u'];
|
||||
$html = $this->file_get_html('http://www.ledauphine.com/'.$this->request.'/rss', false, $context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
$html = $this->getSimpleHTMLDOM('http://www.ledauphine.com/'.$this->request.'/rss',false,$context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
}
|
||||
else {
|
||||
$html = $this->file_get_html('http://www.ledauphine.com/rss', false, $context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
$html = $this->getSimpleHTMLDOM('http://www.ledauphine.com/rss',false,$context) or $this->returnServerError('Could not request DauphineLibere.');
|
||||
}
|
||||
$limit = 0;
|
||||
|
||||
|
@ -126,4 +126,4 @@ class DauphineLibereBridge extends BridgeAbstract {
|
|||
return 3600*2; // 2 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue