test

Ruby code posted by steve
created at 29 Nov 18:12

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'open-uri'

require 'nokogiri'



# Perform a google search

doc = Nokogiri::HTML(open('http://google.com/search?q=tenderlove'))



# Print out each link using a CSS selector

doc.css('h3.r > a.l').each do |link|

  puts link.content

end
264 Bytes in 3 ms with coderay