Labels Milestones
BackBread 2016-05-21 17:02:21 -07:00 elseif (strpos($article["content"], "//www.vgcats.com/comics/?strip_id=") !== FALSE) { elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); } // Wondermark (alt tag already present 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, "//img[@class='ksc' and contains(@src, 'comics')]", $article); } // Dead Philosophers elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } Some comics supported if (strpos($article["link"], "penny-arcade.com") !== FALSE ) { // Penny Arcade elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users // $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // Questionable Content (cleanup) // Questionable Content (cleanup 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); } // Camp Weedonwantcha elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { //noop elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { // Doghouse Diaries, which has broken alt tags if (preg_match("@.*(
- 0.115344 0.993326 vertex 0.410784 -6.35181 7.71954 vertex 6.29114.
- -3.10615e-07 vertex -1.32612 -3.15398 6.59.
- -3.5 (end 0.261252 -0.735 (end -1.88 0.98.
- Normal 0.0814915 0.0817041 0.993319 vertex -4.28788 4.58534.