3
1
Back

04:37:33 -08:00 It's really just a quick and dirty content rewriting engine with code already written for about a dozen webcomics. Examples: * Least I Could Do (wtf image size? If (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; } } //noop elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Eat That Toast bog-standard example // Breaking Cat News $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { // Something Positive // Something Positive elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Make sure bottom ends at z=0 KnobMajorRadius+RingWidth) * 3, 20], center=true); } // Least I Could Do (wtf image size? If(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $doc->saveXML(); } // Poly In Pictures // Poly In Pictures elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Manic Pixie Nightmare Girls elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { $xpath = new DOMDocument(); // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); // $img_tag = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article.

New Pull Request