Skip to content

Instantly share code, notes, and snippets.

View matthieu-gendreau's full-sized avatar

Matthieu Gendreau matthieu-gendreau

View GitHub Profile
{
"schemaVersion": 1,
"label": "backend coverage",
"message": "80.8%",
"color": "brightgreen"
}
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'