3
1
Back

(perhaps useful for non-browser users /* absolute URL */ $abs = "$host$path/$rel"; /* replace '//' or '/./' or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) { } function mangle_article($article) { if (preg_match("@.*(get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); // Timothy Winchester (People I Know) elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // $img_tag = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); } // Two Lumps elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $article['content'] .= "
" . $msg . ""; $img_tag = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Scenes From A Multiverse (to get alt tags) } // SBMC elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE ) { // Three Panel Soul elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) .

New Pull Request