mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-31 20:02:03 +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:
@@ -10,13 +10,13 @@ class PlanetLibreBridge extends BridgeAbstract{
|
||||
}
|
||||
|
||||
private function PlanetLibreExtractContent($url){
|
||||
$html2 = $this->file_get_html($url);
|
||||
$html2 = $this->geSimpleHTMLDOM($url);
|
||||
$text = $html2->find('div[class="post-text"]', 0)->innertext;
|
||||
return $text;
|
||||
}
|
||||
|
||||
public function collectData(array $param){
|
||||
$html = $this->file_get_html('http://www.planet-libre.org/') or $this->returnServerError('Could not request PlanetLibre.');
|
||||
$html = $this->getSimpleHTMLDOM('http://www.planet-libre.org/') or $this->returnServerError('Could not request PlanetLibre.');
|
||||
$limit = 0;
|
||||
foreach($html->find('div.post') as $element) {
|
||||
if($limit < 5) {
|
||||
|
Reference in New Issue
Block a user