3
1
Back

$url_xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if (preg_match("@.*()@", $article['content'], $matches)) { $img = $matches[1]; } } // Dinosaur Comics Cleanup elseif (strpos($article['link'], 'cad-comic.com/sillies/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get the blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] .= "

" . $entry->textContent . "

"; } } if(ADD_IDS){ $article['content'] .= "ID: " . $img->getAttribute('title') . ""; } } // XKCD (alt tags we don't need to call out for) $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Questionable Content (cleanup v1.0 Go to file master PSU/Synth Mages Power Word Stun.kicad_pro | 85.

New Pull Request