This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uri = URI.parse('http://www.nasa.gov/mission_pages/station/research/experiments/277.html') | |
req = Net::HTTP::Get.new(uri.to_s) | |
res = Net::HTTP.start(uri.host, uri.port) { |http| http.request(req) } | |
doc = res.body.gsub(/(\n|\t)/, '').force_encoding('UTF-8') | |
A cette étape j'ai tout ce qu'il me faut notamment la string 'awarded patents' | |
Si je fais un 'puts doc', là ça me tronque le 'awarded patents' et j'ai plus que 'awarded' |