3
1
Back

} function rel2abs($rel, $base) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($html); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, '/comics/') and @class='comic_image']", $article); } // Two Lumps $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']/img", $article); $article['content'] .= "
Alt: $alt_text
"; list($html, $content_type) = $this->get_content($link); //Sites that provide images and just need alt tags if both exist achewood, gwss fix, fix for when invisiblebread has no bread 2016-05-21 17:02:21 -07:00 elseif (strpos($article["content"], "//www.vgcats.com/comics/?strip_id=") !== FALSE) { // Something Positive // Something Positive elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // Poorly Drawn Lines // Berkeley Mews // elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="post"]//img)', $article); $article['content'] = $matches[1]; } } } //noop elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE && // Cyanide & Happiness // Cyanide & Happiness elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Three Panel Soul elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; } } // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { // Timothy Winchester (People I Know foreach ($imgs as $img) { if (preg_match("@.*(

New Pull Request