3
1
Back

One pattern. Class _comics extends Plugin { function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Scenes From A Multiverse (to get alt tag elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); } Various updates, additions 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 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); // Girls with Slingshots // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Wondermark (alt tag already present elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ Various updates, additions elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { $article['content'] = preg_replace("@@", '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Two Lumps elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { // draws two walls in parallel, close together so a PCB can fit between } module pot_0547() { // Breaking Cat News elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $article['content'] .= "
$orig_content
"; } // Camp Weedonwantcha elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } // Cyanide & Happiness elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = new DOMXpath($doc); $imgs .

New Pull Request