3
1
Back

.= "$orig_content"; // Awkward Zombie elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // Dead Philosophers elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); $alt_text = trim($img->getAttribute('title')); if (!$alt_text) { $new_element = $doc->createElement("img"); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Poorly Drawn Lines elseif (strpos($article["link"], "satwcomic.com/") !== FALSE) { // Something Positive elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'uploads') and contains(@src, 'comics')]", $article); } // Three Panel Soul * Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // And get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { // not a comic, just a quick and dirty content.

New Pull Request