3
1
Back

Philosophers 2015-02-25 15:05:54 -08:00 // Poorly Drawn Lines // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Dinosaur Comics Cleanup elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); } Some comics supported elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); } // Something Positive elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $doc = new DOMDocument(); // replace the

(containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } // $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } Added BCN, Something Positive elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); // Berkeley Mews // elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // Alice Grove (get bigger image elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $img = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $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); } // Cyanide & Happiness elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // Breaking Cat News elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article) . $article['content']; } // Scenes From A Multiverse (to get alt tag) // Pain Train alt tag, Alice Grove bigger img Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { //noop $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-img']//img", $article); } // Breaking Cat News elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $article['content'] = $doc->saveXML(); // Questionable Content (cleanup Merge issues to be licensed for everyone's free use or inability to use Git.

New Pull Request