3
1
Back

Sillies elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $article['content'] .= "
Alt: $alt_text
"; list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; // only keep everything starting at the first part Binary files a/3D Printing/Panels/MAGIC MISSILE VCF.png and /dev/null differ 1aa48a179a Add splits and labels to get what game it's about $entries = $xpath->query("//div[@id='comic-notes']"); foreach ($entries as $entry) { $article['content'] .= "" . $entry->ownerDocument->saveXML($entry) . "

"; } } // Dead Philosophers elseif (strpos($article['link'], 'www.timothywinchester.com/2') !== FALSE) { $doc = new DOMDocument(); // replace the (containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { // CTRL+ALT+DEL elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { if (!$title_text || $title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ $text_element = $doc->createElement("i", $title_text); } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title.

New Pull Request