3
1
Back

Slightly complicated; the link is to tumblr, but there's a url in the post that we want if (GDORN_DEBUG && $article['debugging']) { foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Girls with Slingshots elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = new DOMXPath($doc); return $xpath; } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { function rel2abs($rel, $base) { if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Timothy Winchester (People I Know) // Timothy Winchester (People I Know elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Joy of Tech $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img.

New Pull Request