3
1
Back

($title_text == $article['title'] || strpos($article['title'], $title_text) !== false){ $text_element = $doc->createElement("i", $title_text); } function rel2abs($rel, $base) { if (preg_match("@.*(get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Joy of Tech Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // And get blog $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry){ $article['content'] .= "
ID: " . $img->getAttribute('title') . ""; } } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users if (preg_match("@.*(getAttribute('title') . ""; } } } // Dinosaur Comics alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div//img[contains(@src, 'images') and contains(@src, 'comics')]", $article); } // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { $article['content'] .= "

" . $entry->textContent . "

"; .

New Pull Request