From ad82d50bbdf46208b586c00224b6301455be7077 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 12 Aug 2018 11:02:44 +0200 Subject: [PATCH] [CNETBridge] Remove bridge CNET now provides public feeds at https://www.cnet.com/rss/ References #775 --- bridges/CNETBridge.php | 93 ------------------------------------------ 1 file changed, 93 deletions(-) delete mode 100644 bridges/CNETBridge.php diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php deleted file mode 100644 index eefb705..0000000 --- a/bridges/CNETBridge.php +++ /dev/null @@ -1,93 +0,0 @@ - You may specify a -topic found in some section URLs, else all topics are selected.'; - - const PARAMETERS = array( array( - 'topic' => array( - 'name' => 'Topic name' - ) - )); - - public function collectData(){ - - function extractFromDelimiters($string, $start, $end){ - if(strpos($string, $start) !== false) { - $section_retrieved = substr($string, strpos($string, $start) + strlen($start)); - $section_retrieved = substr($section_retrieved, 0, strpos($section_retrieved, $end)); - return $section_retrieved; - } - - return false; - } - - function stripWithDelimiters($string, $start, $end){ - while(strpos($string, $start) !== false) { - $section_to_remove = substr($string, strpos($string, $start)); - $section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end)); - $string = str_replace($section_to_remove, '', $string); - } - - return $string; - } - - function cleanArticle($article_html){ - $article_html = '

' . substr($article_html, strpos($article_html, '

') + 3); - $article_html = stripWithDelimiters($article_html, '', ''); - $article_html = stripWithDelimiters($article_html, ''); - $article_html = stripWithDelimiters($article_html, '