[bridges] use parent::parseItems() instead of feed type specific method

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-09-12 10:42:27 +02:00
parent 15c422c648
commit 3bacb407fe
15 changed files with 20 additions and 20 deletions

View file

@ -30,14 +30,14 @@ class NextgovBridge extends FeedExpander {
}
protected function parseItem($newsItem){
$item = $this->parseRSS_2_0_Item($newsItem);
$item = parent::parseItem($newsItem);
$item['content'] = '';
$namespaces = $newsItem->getNamespaces(true);
if(isset($namespaces['media'])){
$media = $newsItem->children($namespaces['media']);
if(isset($media->content)){
if(isset($media->content)){
$attributes = $media->content->attributes();
$item['content'] = '<img src="' . $attributes['url'] . '">';
}
@ -56,7 +56,7 @@ class NextgovBridge extends FeedExpander {
}
private function ExtractContent($url){
$article = $this->getSimpleHTMLDOMCached($url)
$article = $this->getSimpleHTMLDOMCached($url)
or $this->returnServerError('Could not request Nextgov: ' . $url);
$contents = $article->find('div.wysiwyg', 0)->innertext;