[MediapartBridge] Fix article parsing
* Only process article item, fix issue #1292
This commit is contained in:
parent
f12f6a2dba
commit
c694810d9a
1 changed files with 25 additions and 20 deletions
|
@ -30,6 +30,10 @@ class MediapartBridge extends FeedExpander {
|
||||||
protected function parseItem($newsItem) {
|
protected function parseItem($newsItem) {
|
||||||
$item = parent::parseItem($newsItem);
|
$item = parent::parseItem($newsItem);
|
||||||
|
|
||||||
|
// Mediapart provide multiple type of contents.
|
||||||
|
// We only process items relative to the newspaper
|
||||||
|
// See issue #1292 - https://github.com/RSS-Bridge/rss-bridge/issues/1292
|
||||||
|
if (strpos($item['uri'], self::URI . 'journal/') === 0) {
|
||||||
// Enable single page mode?
|
// Enable single page mode?
|
||||||
if ($this->getInput('single_page_mode') === true) {
|
if ($this->getInput('single_page_mode') === true) {
|
||||||
$item['uri'] .= '?onglet=full';
|
$item['uri'] .= '?onglet=full';
|
||||||
|
@ -54,6 +58,7 @@ class MediapartBridge extends FeedExpander {
|
||||||
$content = defaultLinkTo($content, static::URI);
|
$content = defaultLinkTo($content, static::URI);
|
||||||
$item['content'] .= $content;
|
$item['content'] .= $content;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue