3
1
Back

$article){ $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= "Alt: " . $article['id']; } return $article; } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { /* absolute URL is ready! */ return $scheme . '://' . $abs; if (preg_match("@.*(textContent . "

"; } } // Joy of Tech elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $doc = new DOMDocument(); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $matches[1]; $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); // Dead Philosophers elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { $aftercomic = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // XKCD (alt tags we don't need to call out for foreach ($imgs as $img) .

New Pull Request