Labels Milestones
Back$this->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'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); Assorted updates elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE && // Cyanide & Happiness // Cyanide & Happiness elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); // 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="comicbody"]//img)', $article) . $article['content']; $article['content'] = $img; if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; } } } } //Sites that provide images and just need alt tags textified. Elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { if (preg_match("@.*?(