3
1
Back

"//div[@class='timeline-description']", $article); $article['content'] = preg_replace("@@", '', $article['content']); // Penny Arcade elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // And get blog entry $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags textified. $article['content'] .= "

" . $entry->textContent . "

"; } } // Cyanide & Happiness elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); // Dead Philosophers elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $article['content'] .= "" . $entry->textContent . "

"; } } } function mangle_article($article) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $article['content'] = $matches[1]; } } //Sites that provide images and just need alt tags textified. $doc->loadHTML($article['content']); //no-op $imgs = $xpath->query('//img'); //doesn't get simpler than this.

New Pull Request