lib/plagiarism/strategries/duck.rb in plagiarism2-0.0.1 vs lib/plagiarism/strategries/duck.rb in plagiarism2-0.0.2
- old
+ new
@@ -9,10 +9,10 @@
Typhoeus.get(URL, params: params.merge(q: content))
end
def exists?(response)
doc = Nokogiri::HTML response
- doc.css('.results_links_deep').all? do |row|
+ doc.css('.results_links_deep:not(.result--no-result)').all? do |row|
href = row.at_css('.result__a').attributes['href'].value rescue ''
uri = URI.parse href
uri.host =~ whitelists_regex
end
end