3
1
Back

$article); function mangle_article($article) { // CTRL+ALT+DEL elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $article['content'] = $img; } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = new DOMDocument(); elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Three Panel Soul elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { // SatW elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Joy of Tech elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { // $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Camp Weedonwantcha elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $xpath.

New Pull Request