3
1
Back

Checks) Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= "
Alt: $alt_text
"; } } // Poly In Pictures // Poly In Pictures elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users if (preg_match("@.*(textContent . "

"; $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } //noop elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { // Dead Philosophers $doc->loadHTML($article['content']); // Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks Dead Philosophers elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { // only keep everything starting at.

New Pull Request