Labels Milestones
Back$img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] .= "
" . $entry->textContent . "
"; } } Dead Philosophers $doc->loadHTML($article['content']); // Dinosaur Comics Cleanup $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); } // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $doc = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($bread_page_url); $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'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif. New Pull Request