3
1
Back

If (!$alt_text){ Added BCN, Something Positive elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { //noop elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { // CTRL+ALT+DEL // CTRL+ALT+DEL // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); Added The Trenches; yet more code style tweaking elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $img_tag = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; function rel2abs($rel, $base) { $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Chainsawsuit elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { // Three Panel Soul elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); } // Invisible.

New Pull Request