3
1
Back

A - Source Code Form that results from an addition to, deletion from, or modification of the two, if you want to dig into the linked page for content, e.g. Alt tags. */ global $fetch_last_content_type; $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; return array( 0.1, 'Yet more stupid-simple comic-fetching.', } function get_img_tags($xpath, $query, $article){ $new_src = $this->rel2abs($orig_src, $base_url); foreach($attributes as $attrib_name => $node){ } function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $article['content'] .= "
Alt: $alt_text
"; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup // Dinosaur Comics Cleanup // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $article['content'] .= "
Alt: " . $article['id']; $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debug']) { foreach ($article['debug'] as $msg) { $article['content'] .= "

" . $entry->textContent . "

"; } } // Timothy Winchester (People I Know) elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { //No matches if ($img->getAttribute('title')) { // PhD Unknown elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { //noop elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; } Added BCN, Something Positive elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics.

New Pull Request