3
1
Back

$html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( 0.1, 'Yet more stupid-simple comic-fetching.', } function mangle_article($article) { Added BCN, Something Positive } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { // Camp Weedonwantcha elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = new DOMXpath($doc); elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { // only keep everything starting at the first foreach($imgs as $img){ if ($img->getAttribute('title')) { // replace the

(containing project wonderful) with nothing $article['content'] = $img; } $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, '(//div[@id="main"]//img)', $article); } } function mangle_article($article) { // And get blog entry $entries = $xpath->query("//div[@class='entry']"); // VG Cats elseif (strpos($article["content"], "//www.vgcats.com/comics/?strip_id=") !== FALSE) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } } Clean up.

New Pull Request