3
1
Back

{ 'Yet more stupid-simple comic-fetching.', ' '); } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query("//span[@class='rss-content']"); // Wondermark (alt tag already present elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // Joy of Tech elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // $img_tag = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } // replace the New Pull Request