3
1
Back

.= "Bonus comic:" . $aftercomic . "

"; } } // Dilbert // Dilbert elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); // $article['content'] = $doc->saveHTML(); function get_img_tags($xpath, $query, $article, $base_url=NULL) { /* absolute URL */ $abs = "$host$path/$rel"; function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Three Panel Soul elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { // slightly complicated; the link is to tumblr, but there's a url in the bottom // you can redistribute it and/or modify it under EITHER * the terms and conditions.

New Pull Request