From b0dce860f7d1449db8515ca29da44a0747506708 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 3 Aug 2016 13:58:32 +0200 Subject: [PATCH] Return description from source feed not subsequent pages Gurumed.org prevents download of pictures from external domains. For a feed it is sufficient to see a short description of the article as provided in the source rss. --- bridges/GuruMedBridge.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bridges/GuruMedBridge.php b/bridges/GuruMedBridge.php index cdaeb722..926c1e49 100644 --- a/bridges/GuruMedBridge.php +++ b/bridges/GuruMedBridge.php @@ -17,12 +17,6 @@ class GuruMedBridge extends BridgeAbstract{ return $string; } - function GurumedExtractContent($url) { - $html2 = $this->file_get_html($url); - $text = $html2->find('div.entry', 0)->innertext; - return $text; - } - public function collectData(array $param){ $html = $this->file_get_html('http://gurumed.org/feed') or $this->returnError('Could not request Gurumed.', 404); $limit = 0; @@ -33,7 +27,7 @@ class GuruMedBridge extends BridgeAbstract{ $item->title = $this->GurumedStripCDATA($element->find('title', 0)->innertext); $item->uri = $this->GurumedStripCDATA($element->find('guid', 0)->plaintext); $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); - $item->content = $this->GurumedExtractContent($item->uri); + $item->content = $this->GurumedStripCDATA(strip_tags($element->find('description', 0), '


')); $this->items[] = $item; $limit++; }