3
1
Back

MS5: RLRLR-- RLRLR-- <- it's a 5-roll, I think this is far simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Penny Arcade elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { //noop elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { $aftercomic = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'png')]", $article); Created by editing arbitrary.

New Pull Request