diff --git a/bridges/FuturaSciencesBridge.php b/bridges/FuturaSciencesBridge.php index 79c05880..4a8674f3 100644 --- a/bridges/FuturaSciencesBridge.php +++ b/bridges/FuturaSciencesBridge.php @@ -85,7 +85,7 @@ class FuturaSciencesBridge extends FeedExpander { protected function parseItem($newsItem){ $item = parent::parseItem($newsItem); - $item['uri'] = str_replace('#xtor=RSS-8', '', $item['uri']); + $item['uri'] = str_replace('#xtor%3DRSS-8', '', $item['uri']); $article = getSimpleHTMLDOMCached($item['uri']) or returnServerError('Could not request Futura-Sciences: ' . $item['uri']); $item['content'] = $this->extractArticleContent($article); @@ -96,31 +96,47 @@ class FuturaSciencesBridge extends FeedExpander { } private function extractArticleContent($article){ - $contents = $article->find('section.article-text', 1)->innertext; - $headline = trim($article->find('p.description', 0)->plaintext); - if(!empty($headline)) - $headline = '
' . $headline . '
'; + $contents = $article->find('section.article-text', 1); - foreach (array( - ''); @@ -131,7 +147,7 @@ class FuturaSciencesBridge extends FeedExpander { $contents = stripWithDelimiters($contents, ''); - return $headline . trim($contents); + return trim($contents); } // Extracts the author from an article or element