æ¹é http://www.ted.com/talks/subtitles/id/#{åºæã®ID}/lang/en ãå©ãã¨ãè±èªå稿ã®jsonãè¿ã£ã¦ããã TEDã®ãããªã®åºæã®IDãåå¾ãã¦ãAPIå©ãã¦ãjsonãparseãã¦ãåºåããã°ããããã jsonã®ãã¼ã¹ gem install jsonrequire 'rubygems' require 'open-uri' require 'json' open("http://www.ted.com/talks/subtitles/id/1183/lang/en") do |f| json = JSON.parse(f.read) json['captions'].each do |j| puts j['content'] end end ãããªæãã§åå¾ã§ãããã åºæIDãåå¾ããããã«ãnokogiriã§HTMLãpars
{{#tags}}- {{label}}
{{/tags}}