3
1
Back

Prevent interference from U1's pin 2?" 26b0f01955 Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text function get_content($link) { $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( $html, $content_type ); } function hook_render_article($article) { return $base . $rel; } if ($rel[0]=='#' || $rel[0]=='?') { return array(0.1, 'Yet more stupid-simple comic-fetching.', ' '); } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='signoff-wrapper']"); } //Sites that provide images and just need alt tags if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; $img = preg_replace("@width=\"\d+\"@", "", $img); $img = $matches[1]; $img = $matches[1]; } } // Poly In Pictures elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); // Girls with Slingshots elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $article['content'] .= "
ID: " . $img->getAttribute('title') . ""; } } Clean up code formatting; added a few comics; standardized appending alt/title text elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Dilbert.

New Pull Request