diff --git a/bridges/CADBridge.php b/bridges/CADBridge.php index 86dfdb06..595160e2 100644 --- a/bridges/CADBridge.php +++ b/bridges/CADBridge.php @@ -16,7 +16,7 @@ class CADBridge extends FeedExpander { } private function CADExtractContent($url) { - $html3 = $this->get_cached($url); + $html3 = $this->getSimpleHTMLDOMCached($url); // The request might fail due to missing https support or wrong URL if($html3 == false) diff --git a/bridges/CommonDreamsBridge.php b/bridges/CommonDreamsBridge.php index e8a4af38..224b309a 100644 --- a/bridges/CommonDreamsBridge.php +++ b/bridges/CommonDreamsBridge.php @@ -17,7 +17,7 @@ class CommonDreamsBridge extends FeedExpander { } private function CommonDreamsExtractContent($url) { - $html3 = $this->get_cached($url); + $html3 = $this->getSimpleHTMLDOMCached($url); $text = $html3->find('div[class=field--type-text-with-summary]', 0)->innertext; $html3->clear(); unset ($html3); diff --git a/bridges/CpasbienBridge.php b/bridges/CpasbienBridge.php index 829c5960..10af594d 100644 --- a/bridges/CpasbienBridge.php +++ b/bridges/CpasbienBridge.php @@ -1,5 +1,5 @@ getAttribute('class')=='ligne0' || $episode->getAttribute('class')=='ligne1') { - $htmlepisode=$this->get_cached($episode->find('a', 0)->getAttribute('href')); + $htmlepisode=$this->getSimpleHTMLDOMCached($episode->find('a', 0)->getAttribute('href')); $item = array(); $item['author'] = $episode->find('a', 0)->text(); diff --git a/bridges/DauphineLibereBridge.php b/bridges/DauphineLibereBridge.php index fe4775ca..9e9aacd4 100644 --- a/bridges/DauphineLibereBridge.php +++ b/bridges/DauphineLibereBridge.php @@ -47,7 +47,7 @@ class DauphineLibereBridge extends FeedExpander { } private function ExtractContent($url) { - $html2 = $this->get_cached($url); + $html2 = $this->getSimpleHTMLDOMCached($url); $text = $html2->find('div.column', 0)->innertext; $text = preg_replace('@@si', '', $text); return $text; diff --git a/bridges/DeveloppezDotComBridge.php b/bridges/DeveloppezDotComBridge.php index fe08d286..5cbd5767 100644 --- a/bridges/DeveloppezDotComBridge.php +++ b/bridges/DeveloppezDotComBridge.php @@ -42,7 +42,7 @@ class DeveloppezDotComBridge extends FeedExpander { } private function DeveloppezDotComExtractContent($url) { - $articleHTMLContent = $this->get_cached($url); + $articleHTMLContent = $this->getSimpleHTMLDOMCached($url); $text = $this->convert_smart_quotes($articleHTMLContent->find('div.content', 0)->innertext); $text = utf8_encode($text); return trim($text); diff --git a/bridges/FreenewsBridge.php b/bridges/FreenewsBridge.php index dbc46b9e..1934e0b3 100644 --- a/bridges/FreenewsBridge.php +++ b/bridges/FreenewsBridge.php @@ -13,7 +13,7 @@ class FreenewsBridge extends FeedExpander { protected function parseItem($newsItem) { $item = $this->parseRSS_2_0_Item($newsItem); - $articlePage = $this->get_cached($item['uri']); + $articlePage = $this->getSimpleHTMLDOMCached($item['uri']); $content = $articlePage->find('.post-container', 0); $item['content'] = $content->innertext; diff --git a/bridges/FuturaSciencesBridge.php b/bridges/FuturaSciencesBridge.php index 2cf846c2..73f1b530 100644 --- a/bridges/FuturaSciencesBridge.php +++ b/bridges/FuturaSciencesBridge.php @@ -86,7 +86,7 @@ class FuturaSciencesBridge extends FeedExpander { protected function parseItem($newsItem){ $item = $this->parseRSS_2_0_Item($newsItem); $item['uri'] = str_replace('#xtor=RSS-8', '', $item['uri']); - $article = $this->get_cached($item['uri']) + $article = $this->getSimpleHTMLDOMCached($item['uri']) or $this->returnServerError('Could not request Futura-Sciences: ' . $item['uri']); $item['content'] = $this->ExtractArticleContent($article); $item['author'] = empty($this->ExtractAuthor($article)) ? $item['author'] : $this->ExtractAuthor($article); diff --git a/bridges/JapanExpoBridge.php b/bridges/JapanExpoBridge.php index 4019ae86..dcd951ad 100644 --- a/bridges/JapanExpoBridge.php +++ b/bridges/JapanExpoBridge.php @@ -1,5 +1,5 @@ get_cached($url) or $this->returnServerError('Could not request JapanExpo: '.$url); + $article_html = $this->getSimpleHTMLDOMCached('Could not request JapanExpo: '.$url); $header = $article_html->find('header.pageHeadBox', 0); $timestamp = strtotime($header->find('time', 0)->datetime); $title_html = $header->find('div.section', 0)->next_sibling(); diff --git a/bridges/KununuBridge.php b/bridges/KununuBridge.php index da159ce6..a958b77b 100644 --- a/bridges/KununuBridge.php +++ b/bridges/KununuBridge.php @@ -1,5 +1,5 @@ get_cached($uri); + $html = $this->getSimpleHTMLDOMCached($uri); if($html === false) $this->returnServerError('Could not load full description!'); diff --git a/bridges/LeJournalDuGeekBridge.php b/bridges/LeJournalDuGeekBridge.php index c723a2fa..95bd960a 100644 --- a/bridges/LeJournalDuGeekBridge.php +++ b/bridges/LeJournalDuGeekBridge.php @@ -17,7 +17,7 @@ class LeJournalDuGeekBridge extends FeedExpander { } private function LeJournalDuGeekExtractContent($url) { - $articleHTMLContent = $this->get_cached($url); + $articleHTMLContent = $this->getSimpleHTMLDOMCached($url); $text = $articleHTMLContent->find('div.post-content', 0)->innertext; foreach($articleHTMLContent->find('a.more') as $element) { diff --git a/bridges/LeMondeInformatiqueBridge.php b/bridges/LeMondeInformatiqueBridge.php index 010228a3..f609517c 100644 --- a/bridges/LeMondeInformatiqueBridge.php +++ b/bridges/LeMondeInformatiqueBridge.php @@ -12,7 +12,7 @@ class LeMondeInformatiqueBridge extends FeedExpander { protected function parseItem($newsItem){ $item = $this->parseRSS_1_0_Item($newsItem); - $article_html = $this->get_cached($item['uri']) + $article_html = $this->getSimpleHTMLDOMCached($item['uri']) or $this->returnServerError('Could not request LeMondeInformatique: ' . $item['uri']); $item['content'] = $this->CleanArticle($article_html->find('div#article', 0)->innertext); $item['title'] = $article_html->find('h1.cleanprint-title', 0)->plaintext; diff --git a/bridges/LichessBridge.php b/bridges/LichessBridge.php index 638811d2..6f645394 100644 --- a/bridges/LichessBridge.php +++ b/bridges/LichessBridge.php @@ -17,7 +17,7 @@ class LichessBridge extends FeedExpander { } private function retrieve_lichess_post($blog_post_uri){ - $blog_post_html = $this->get_cached($blog_post_uri); + $blog_post_html = $this->getSimpleHTMLDOMCached($blog_post_uri); $blog_post_div = $blog_post_html->find('#lichess_blog', 0); $post_chapo = $blog_post_div->find('.shortlede', 0)->innertext; diff --git a/bridges/NextInpactBridge.php b/bridges/NextInpactBridge.php index 815a2363..3152b09e 100644 --- a/bridges/NextInpactBridge.php +++ b/bridges/NextInpactBridge.php @@ -17,7 +17,7 @@ class NextInpactBridge extends FeedExpander { } private function ExtractContent($url) { - $html2 = $this->get_cached($url); + $html2 = $this->getSimpleHTMLDOMCached($url); $text = '
'.$html2->find('span.sub_title', 0)->innertext.'
' .'' .'