3
1
Back

$doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); // And get blog entry $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Least I Could Do (wtf image size? If(preg_match("@.*()@", $article['content'], $matches)){ $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $img; if (preg_match("@.*()@", $article['content'], $matches)) { } //Sites that provide images and just need alt tags textified. Function rel2abs($rel, $base if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return array(0.1, return array( 0.1, 'Yet more stupid-simple comic-fetching.', } function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "" . $entry->textContent . "

"; $article['content'] .= "
$orig_content
"; } // Invisible Bread (make the bread visible elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content.

New Pull Request