3
1
Back

(strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE ) { // only keep everything starting at the first if(preg_match("@.*(get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $img; } //Sites that provide images and just need alt tags textified. } //Sites that provide images and just need alt tags elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { Gunnerkrigg and cleanup of alt-tag-only sites elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $img; } } //Sites that provide images and just need alt tags textified. } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { // Robot Hugs $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry){ $article['content'] .= "Bonus comic:" . $aftercomic . "

"; // only keep everything starting at the.

New Pull Request