Created
February 7, 2017 05:56
-
-
Save BuonOmo/fffb845ba9cc082493f1d04e6a3929eb to your computer and use it in GitHub Desktop.
Get to the point with forbes top 10.
This file contains 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
puts (1..10).map do |i| | |
doc = Nokogiri::HTML(open("http://www3.forbes.com/leadership/the-10-best-cities-for-jobs-in-2017/#{i}/")) | |
(11 - i).to_s + ": " + doc.css('.articleContentText > p > strong').text.split(' – ').pop | |
end.reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment