3
1
Back

. $entry->textContent . "

"; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users if (preg_match("@.*(mangle_article($article); } function rel2abs($rel, $base $path = preg_replace('#/[^/]*$#', '', $path); if ($rel[0] == '/') { $path = ''; $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); if ($alt_text && !$title_text){ $text_element = $doc->createElement("i", $title_text); } elseif (strpos($title_text, $alt_text) !== False) { if (strpos($article["content"], "bonus panel!") !== FALSE) { //noop elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $article['content'] = $img_tag . $article['content']; // $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // Gunnerkrigg Court elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL Sillies // CTRL+ALT+DEL // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Least I Could Do (wtf image size?) // Least I Could Do (wtf image size? If(preg_match("@.*()@", $article['content'], $matches)){ $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } .

New Pull Request