3
1
Back

In img src and quotes in alt/title text under images (extra useful for non-browser users) Clean up code formatting; added a few comics; standardized appending alt/title text elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { Gunnerkrigg and cleanup of alt-tag-only sites // Gunnerkrigg Court elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // Camp Weedonwantcha elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { // Eat That Toast bog-standard example if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'png')]", $article); } // PhD Unknown // Robot Hugs elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); } // Questionable Content (cleanup) $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, //and sometimes necessary for old fogeys like me to get what game it's about $orig_content = strip_tags($article['content']); $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); // $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; // Cyanide & Happiness elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $doc = new DOMDocument(); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace("@@", '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { // Girls with Slingshots // Girls with Slingshots elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // Girls with Slingshots elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } 3D Printing/Pot_Knobs/pot_knob-6mm-big.stl.

New Pull Request