mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-20 07:11:43 +02:00
bridges: rename file_get_html to getSimpleHTMLDOM
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -45,7 +45,7 @@ class TheHackerNewsBridge extends BridgeAbstract {
|
||||
return $string;
|
||||
}
|
||||
|
||||
$html = $this->file_get_html($this->getURI()) or $this->returnServerError('Could not request TheHackerNews: '.$this->getURI());
|
||||
$html = $this->getSimpleHTMLDOM($this->getURI()) or $this->returnServerError('Could not request TheHackerNews: '.$this->getURI());
|
||||
$limit = 0;
|
||||
|
||||
foreach ($html->find('article') as $element) {
|
||||
@@ -55,7 +55,7 @@ class TheHackerNewsBridge extends BridgeAbstract {
|
||||
$article_author = trim($element->find('span.vcard', 0)->plaintext);
|
||||
$article_title = $element->find('a.entry-title', 0)->plaintext;
|
||||
$article_timestamp = strtotime($element->find('span.updated', 0)->plaintext);
|
||||
$article = $this->file_get_html($article_url) or $this->returnServerError('Could not request TheHackerNews: '.$article_url);
|
||||
$article = $this->getSimpleHTMLDOM($article_url) or $this->returnServerError('Could not request TheHackerNews: '.$article_url);
|
||||
|
||||
$contents = $article->find('div.articlebodyonly', 0)->innertext;
|
||||
$contents = StripRecursiveHTMLSection($contents, 'div', '<div class=\'clear\'');
|
||||
@@ -73,4 +73,4 @@ class TheHackerNewsBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user