3
1
Back

"//div[@id='cc-comicbody']/img", $article); } // Camp Weedonwantcha elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // XKCD (alt tags we don't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ $article['content'] = $img; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users if (preg_match("@.*(get_img_tags($xpath, "//div[@id='content']/img", $article); } // Questionable Content (cleanup // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $img; } } return $result_html; } function get_img_tags($xpath, $query, $article, $base_url=NULL) { function about() { return $base . $rel; } if (strpos($article['link'], 'eatthattoast.com/comic.

New Pull Request