3
1
Back

If ($title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ } elseif (strpos($title_text, $alt_text) !== False) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } // Dead Philosophers $doc->loadHTML($article['content']); // Dinosaur Comics Cleanup elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Joy of Tech } // Eat That Toast bog-standard example // Breaking Cat News elseif (strpos($article['link'], 'amultiverse.com/comic/') !== 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'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // PhD Unknown elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE.

New Pull Request