Class: Ubi::Consultor::Google

Inherits:
Base
  • Object
show all
Defined in:
lib/ubi/consultores/google.rb

Overview

URL finder consultor

Constant Summary

Constants inherited from Base

Base::HEADERS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#datum, inherited, #initialize, name, #parser, #query_url, #request

Constructor Details

This class inherits a constructor from Ubi::Consultor::Base

Class Method Details

.urlObject



18
19
20
# File 'lib/ubi/consultores/google.rb', line 18

def url
  'https://www.google.com.br/search?'
end

Instance Method Details



9
10
11
# File 'lib/ubi/consultores/google.rb', line 9

def links
  '//a[not (contains(@href,"google"))]'
end

#queryObject

HTML



5
6
7
# File 'lib/ubi/consultores/google.rb', line 5

def query
  { q: @thema.name }
end

#wordsObject



13
14
15
# File 'lib/ubi/consultores/google.rb', line 13

def words
  '//div[@class="res"]'
end