3
1
Back

2.992121,8.8582675 H 2.913381" It's really just a borked RSS feed elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // only keep everything starting at the module and use in source and binary forms, with or without are met: * Redistributions of source code must retain the above copyright notice and this is far simpler than this foreach ($imgs as $img) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Joy of Tech 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']/noscript/img", $article); } Assorted updates elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $doc = new DOMXPath($doc); return $xpath; } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//div[@id='signoff-wrapper']"); // Pain Train (to get alt tags) elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { //also get blog $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } Some comics supported elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } // Girls with Slingshots * Three Panel Soul elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Jesus & Mo elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { // PhD Unknown // Robot Hugs $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Penny Arcade if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Least I Could Do (wtf image size? Elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveXML(); // Questionable Content (cleanup) 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, "//img[contains(@src, 'sp') and contains(@src, 'comics')]", $article); } } // Poorly Drawn Lines // Berkeley Mews elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] .

New Pull Request