# File lib/nicovideo/random.rb, line 27 def parse(page) result_xpath = page/'//td[@class="random_td"]//p[@class="TXT12"]/a[@class="video"]' @videos = result_xpath.inject([]) {|arr,v| # #puts v.attributes['href'] vp = VideoPage.new(@agent, v.attributes['href'].sub(/watch\/(\w+)$/,'\1')) vp.title = v.inner_html arr << vp } end