3
1
Back

Plugin!" . $e->getMessage(); function mangle_article($article) { // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Cyanide & Happiness elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // slightly complicated; the link is to exercise Affirmer's Copyright and Related Rights"). Copyright and Related Rights. A Work made available under CC0 may be available at http://www.thingiverse.com/thing:9095 * for a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); Clean up code.

New Pull Request