3
1
Back

"//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // Three Panel Soul // Two Lumps elseif (strpos($article['link'], 'threepanelsoul.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $alt_text); $para_element->appendChild($text_element); } elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] .= "

" . $entry->textContent . "

"; } } if (ADD_IDS) { $new_element->appendChild($para_element); if ($alt_text && !$title_text){ $text_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } Clean up code.

New Pull Request