Skip to content

Instantly share code, notes, and snippets.

@ymrl
Created May 8, 2012 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymrl/2637475 to your computer and use it in GitHub Desktop.
Save ymrl/2637475 to your computer and use it in GitHub Desktop.
# http://estar.jp/.pc/_novel_view?w=13428686 を読む
require 'open-uri'
require 'yaml'
page = ARGV[0] || 1
page.upto(121).each do |page|
data = YAML.load(open("http://estar.jp/api/get_novel_page_info?_=1336496080883&w=13428686&p=#{page}").read)
puts "======== #{data["subject"].gsub(/<.*?>/,'')} ========"
puts data["content"].gsub(/<.*?>/,'')
puts "\n\n#{page}\n\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment