mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-12 11:34:09 +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:
@@ -16,7 +16,7 @@ class NextInpactBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
private function ExtractContent($url) {
|
||||
$html2 = $this->file_get_html($url);
|
||||
$html2 = $this->getSimpleHTLDOM($url);
|
||||
$text = '<p><em>'.$html2->find('span.sub_title', 0)->innertext.'</em></p>'
|
||||
.'<p><img src="'.$html2->find('div.container_main_image_article', 0)->find('img.dedicated',0)->src.'" alt="-" /></p>'
|
||||
.'<div>'.$html2->find('div[itemprop=articleBody]', 0)->innertext.'</div>';
|
||||
@@ -27,7 +27,7 @@ class NextInpactBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
public function collectData(array $param) {
|
||||
$html = $this->file_get_html('http://www.nextinpact.com/rss/news.xml') or $this->returnServerError('Could not request NextInpact.');
|
||||
$html = $this->getSimpleHTMLDOM('http://www.nextinpact.com/rss/news.xml') or $this->returnServerError('Could not request NextInpact.');
|
||||
$limit = 0;
|
||||
|
||||
foreach($html->find('item') as $element) {
|
||||
|
Reference in New Issue
Block a user