3
1
Back

Example elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // Breaking Cat News elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'uploads') and contains(@src, 'comics')]", $article); // Girls with Slingshots $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Penny Arcade elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { $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'] = preg_replace("@@", '', $article['content']); } // Drugs and Wires elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE ) { // Two Lumps elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { // only keep everything starting at the first foreach($imgs as $img){ $article['content'] .= "

" . $entry->textContent . "

"; } } // XKCD (alt tags we don't need to call out for) $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code.

New Pull Request