gsearch-parser 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gsearch-parser.gemspec +1 -1
- data/lib/gsearch-parser.rb +4 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
data/gsearch-parser.gemspec
CHANGED
data/lib/gsearch-parser.rb
CHANGED
@@ -74,6 +74,7 @@ class GoogleWebSearch
|
|
74
74
|
|
75
75
|
# Iterate over each Google result list element
|
76
76
|
@currentPage.css('li.g').each do |result|
|
77
|
+
begin
|
77
78
|
# Extract the title
|
78
79
|
title = result.css('h3 a').first.inner_html
|
79
80
|
|
@@ -91,6 +92,9 @@ class GoogleWebSearch
|
|
91
92
|
|
92
93
|
# Create a new Result object and append to the array
|
93
94
|
currentResults << Result.new(title, content, uri)
|
95
|
+
rescue NoMethodError
|
96
|
+
next
|
97
|
+
end
|
94
98
|
end
|
95
99
|
@results += currentResults
|
96
100
|
return currentResults
|