3
1
Back

And dirty content rewriting engine with code already written for about a dozen webcomics. Examples: * Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); // Joy of Tech elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // Dead Philosophers elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $article['content'] .= $aftercomic; } } foreach($imgs as $img){ $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . ""; // Softer World (alt tags), Dinosaur Comics Cleanup $entries = $xpath->query("//div[@class='entry']"); if (preg_match("@.*(.*)@", $article['content'], $matches)) { $img = $matches[1]; // Least I Could Do You'll note several.

New Pull Request