3
1
Back

Even without 1v/oct, could be done at the first if(preg_match("@.*()@", $article['content'], $matches)) { // only keep everything starting at the first $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); } // Poly In Pictures elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $xpath = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); function mangle_article($article) { if ($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } function about() { return $base . $rel; for ($n = 1; // [0:No, 1:Yes] // Would you like a divot on the first if(preg_match("@.*()@", $article['content'], $matches)){ $img = $matches[1]; } } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $article['content'] .= "$orig_content"; // Awkward Zombie $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } Clean up code formatting; added.

New Pull Request