Labels Milestones
BackIndentations, you way want to dig into the linked page for content, e.g. Alt tags. */ global $fetch_last_content_type; $html = fetch_file_contents($link); $content_type = $fetch_last_content_type; function rel2abs($rel, $base) { Various updates, additions elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Cyanide & Happiness elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // The Trenches elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $article['content'] = $img; } } // $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Poly In Pictures elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='timeline-description']", $article); } // Three Panel Soul elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get blog entry $entries = $xpath->query("//div[@class='entry']"); foreach ($entries as $entry){ $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } if(preg_match("@.*(