3
1
Back

Won't keep traces_before_hard_sync Fix for two bugs in Doghouse Diaries rss: spaces in img src and quotes in alt/title text under images (extra useful for non-browser users function get_content($link) { /** * When debugging or writing a new fetcher, use the ARTICLE_FILTER hook. } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $alt_text); } elseif (strpos($title_text, $alt_text) !== false){ $text_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } $img->parentNode->replaceChild($new_element, $img); } function mangle_article($article) { // Something Positive elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'jpg')]", $article, "http://vgcats.com/comics/"); // Invisible Bread (make the bread visible) $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Scenes From A.

New Pull Request