def parse(page)
if page.body =~ /<strong>#{@video_id}<\/strong>を含む公開マイリストはありません。/
@not_found = true
raise NotFound
end
@total_size = page.search('//form[@name="sort"]//td[@class="TXT12"]//strong').first.inner_html.sub(/,/,'').to_i
@has_next = false
@has_prev = false
respages = page/'//div[@class="mb16p4"]//p[@class="TXT12"]//a'
puts_info respages.size
respages.each {|r| puts_info r.inner_html }
if respages.size > 0
respages.each {|text|
if text.inner_html =~ /前のページ/
@has_prev = true
end
if text.inner_html =~ /次のページ/
@has_next = true
end
}
end
scanpattern = /<a href=\"#{BASE_URL}\/mylist\/(\d+)\">(.+?)<\/a>/ou
listrefs = page.parser.to_html.scan(scanpattern)
@mylists = listrefs.inject([]) {|arr, v|
ml = MyList.new(@agent, v[0])
ml.title = v[1]
arr << ml
}
end