From f14a5bd7718520f8e357654a003d63be08e3363b Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Fri, 10 Aug 2018 19:53:32 +0200 Subject: [PATCH] [CADBridge] Remove bridge https://cad-comic.com/ now provides feeds at - https://cad-comic.com/feed (rss) - https://cad-comic.com/feed/atom (atom) Thus multiple alternatives are available to choose from, making this bridge obsolete: - FilterBridge (using one of the feeds above) - WordPressBridge (on the main site) - One of the two available feeds References #752 --- bridges/CADBridge.php | 45 ------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 bridges/CADBridge.php diff --git a/bridges/CADBridge.php b/bridges/CADBridge.php deleted file mode 100644 index e88cbbb..0000000 --- a/bridges/CADBridge.php +++ /dev/null @@ -1,45 +0,0 @@ -collectExpandableDatas('http://cdn2.cad-comic.com/rss.xml', 10); - } - - protected function parseItem($newsItem){ - $item = parent::parseItem($newsItem); - $item['content'] = $this->extractCADContent($item['uri']); - return $item; - } - - private function extractCADContent($url) { - $html3 = getSimpleHTMLDOMCached($url); - - // The request might fail due to missing https support or wrong URL - if($html3 == false) - return 'Daily comic not released yet'; - - $htmlpart = explode('/', $url); - - switch ($htmlpart[3]) { - case 'cad': - preg_match_all('/http:\/\/cdn2\.cad-comic\.com\/comics\/cad-\S*png/', $html3, $url2); - break; - case 'sillies': - preg_match_all('/http:\/\/cdn2\.cad-comic\.com\/comics\/sillies-\S*gif/', $html3, $url2); - break; - default: - return 'Daily comic not released yet'; - } - $img = implode($url2[0]); - $html3->clear(); - unset($html3); - if ($img == '') - return 'Daily comic not released yet'; - return ''; - } -}