3
1
Back

($bread) { $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( $html, $content_type); } function init($host) { /** * Use this if you feel like it, otherwise I'm just scratching my own itch here. * Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { catch (Exception $e) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // Dead Philosophers 2015-02-25 15:05:54 -08:00 // Poorly Drawn Lines elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { // Dilbert elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks Added BCN, Something Positive elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } return $article; } Some comics supported Some comics supported elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { //noop elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // SatW elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE && // Cyanide & Happiness elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = preg_replace("@@", '', $article['content']); } // Something Positive elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // PhD Unknown elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); elseif (strpos($article['content'], 'invisiblebread.com/2') .

New Pull Request