3
1
Back

$img_tag . $article['content']; } // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // only keep everything starting at the first if(preg_match("@.*(get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } // Dinosaur Comics Cleanup elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Drugs and Wires drugs & wires, pilotside drugs & wires, pilotside elseif (strpos($article["link"], "berkeleymews.com/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Joy of Tech $xpath = new DOMXPath($doc); } function rel2abs($rel, $base) { function about() { return $base.$rel; } extract(parse_url($base)); $path = ''; function get_xpath_dealie($link) { $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array( '#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#' ); for ($n = 1; $n > 0; $abs = preg_replace($re, '/', $abs, -1, $n)) {} footprint.

New Pull Request