3
1
Back

You don't need to call out for foreach ($imgs as $img) { $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // only keep everything starting at the point they're to be fixed elsewhere elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { // Poorly Drawn Lines elseif (strpos($article["link"], "explosm.net/comics") !== 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'] = $doc->saveXML(); } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { //noop elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // Drugs and Wires elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE ) { // Robot Hugs $entries = $xpath->query("//div[@class='entry']"); // VG Cats elseif (strpos($article["content"], "//www.vgcats.com/comics/?strip_id=") !== FALSE) { //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "
$orig_content
"; // Awkward Zombie $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry){ $article['content'] .= "
" . $msg . ""; } } function mangle_article($article) { // $xpath .

New Pull Request