Last active
July 21, 2016 16:10
-
-
Save matthieu-gendreau/d56df9e716613e66cd59e4c5cff7f9b5 to your computer and use it in GitHub Desktop.
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' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment