diff --git a/lib/gscraper/search/web_query.rb b/lib/gscraper/search/web_query.rb
index <HASH>..<HASH> 100644
--- a/lib/gscraper/search/web_query.rb
+++ b/lib/gscraper/search/web_query.rb
@@ -408,7 +408,7 @@ module GScraper
             raise(Blocked,"Google has temporarily blocked our IP Address",caller)
           end
 
-          results = doc.search('li.g')
+          results = doc.search('//li[@class="g"]')
           results_length = [@results_per_page, results.length].min
 
           rank_offset = result_offset_of(page_index)
Use an XPath expression here as well.