回答編集履歴
1
追記
test
CHANGED
@@ -44,7 +44,11 @@
|
|
44
44
|
|
45
45
|
doc.xpath('//h3[@class="r"]').each do |h3|
|
46
46
|
|
47
|
-
puts h3.text
|
47
|
+
puts "タイトル:" + h3.text
|
48
|
+
|
49
|
+
url = CGI.unescape(CGI.unescapeHTML(h3.xpath('a/@href').text))
|
50
|
+
|
51
|
+
puts "URL:" + url.split('&sa=U&ved=').first.sub('/url?q=', '')
|
48
52
|
|
49
53
|
end
|
50
54
|
|