1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-18 06:11:33 +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

@@ -57,7 +57,7 @@ class NextgovBridge extends BridgeAbstract {
if ($category !== preg_replace('/[^a-z-]+/', '', $category) || strlen($category > 32))
$this->returnClientError('Invalid "category" parameter.');
$url = $this->getURI().'rss/'.$category.'/';
$html = $this->file_get_html($url) or $this->returnServerError('Could not request Nextgov: '.$url);
$html = $this->getSimpleHTMLDOM($url) or $this->returnServerError('Could not request Nextgov: '.$url);
$limit = 0;
foreach ($html->find('item') as $element) {
@@ -69,7 +69,7 @@ class NextgovBridge extends BridgeAbstract {
$article_subtitle = $element->find('description', 0)->plaintext;
$article_timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$article_thumbnail = ExtractFromDelimiters($element->innertext, '<media:content url="', '"');
$article = $this->file_get_html($article_url) or $this->returnServerError('Could not request Nextgov: '.$article_url);
$article = $this->getSimpleHTMLDOM($article_url) or $this->returnServerError('Could not request Nextgov: '.$article_url);
$contents = $article->find('div.wysiwyg', 0)->innertext;
$contents = StripWithDelimiters($contents, '<div class="ad-container">', '</div>');
@@ -91,4 +91,4 @@ class NextgovBridge extends BridgeAbstract {
}
}
}
}