3
1
Back

If (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = $matches[1]; } } // Cyanide & Happiness elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); } // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL Sillies // Two Lumps // Two Lumps elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } Clean up code formatting; added a few due to referer checks elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // Something Positive Some comics supported elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = new DOMDocument(); // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } // 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'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== 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($article['link']); $article['content'] = $matches[1]; elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { // XKCD (alt tags we don't need to call.

New Pull Request