mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
[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:
parent
15c422c648
commit
3bacb407fe
15 changed files with 20 additions and 20 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue