1
0
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:
Pierre Mazière
2016-08-09 14:57:42 +02:00
parent 86515a1560
commit 6e2c7ceaf4
12 changed files with 38 additions and 38 deletions

View File

@@ -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 {
}
}
}
}