3
1
Back

Img Pain Train (to get alt tag 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) . $article['content']; } Various updates, additions elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveHTML(); function get_img_tags($xpath, $query, $article) { function api_version() { * Inserts text captions from any image with an alt or title tag. Function alt_textify($article, $doc = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); Added The Trenches; yet more code style tweaking Added The Trenches; yet more code style tweaking Gunnerkrigg and cleanup of alt-tag-only sites // Gunnerkrigg Court elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ $article['content'] .= "

" . $entry->textContent . "

"; } } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // only keep everything starting at the first if(preg_match("@.*()@", $article['content'], $matches)){ // Least I Could Do (wtf image size?) // Least I Could Do (wtf image size?) $xpath = $this->get_xpath_dealie($article['link']); $article['content'] .

New Pull Request