3
1
Back

'www.robot-hugs.com/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Scenes From A Multiverse (to get alt tags) } // Breaking Cat News // Breaking Cat News // Breaking Cat News elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { // Two Lumps elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { $article['content'] = $img_tag . $article['content']; } // Three Panel Soul $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Least I Could Do (wtf image size? If(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); elseif (strpos($article["link"], "poorlydrawnlines.com/comic/") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $xpath = new DOMXPath($doc); return $xpath; } function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//span[@class='rss-content']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get blog $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $orig_src = $entry->getAttribute('src'); $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } module.

New Pull Request