Class: Clients::Recaptcha::Client

Inherits:
HttpClient show all
Defined in:
lib/clients/recaptcha/client.rb

Instance Attribute Summary collapse

Attributes inherited from HttpClient

#cookies, #proxy, #user_agent

Instance Method Summary collapse

Methods inherited from HttpClient

#has_cookies?, #head, #initialize, #post, #proxy?, #request, #reset, #reset_cookies, #reset_proxy, #reset_user_agent, #store_cookies, user_agents_path

Constructor Details

This class inherits a constructor from Clients::HttpClient

Instance Attribute Details

#solverObject



19
20
21
# File 'lib/clients/recaptcha/client.rb', line 19

def solver
  @solver ||= Solver.new(self)
end

Instance Method Details

#get(url, **options, &block) ⇒ Object



9
10
11
12
13
# File 'lib/clients/recaptcha/client.rb', line 9

def get(url, **options, &block)
  response = super
  response = bypass_captcha(url, response) if captcha_protected?(response)
  response
end

#get_without_bypass(url, **options, &block) ⇒ Object



15
16
17
# File 'lib/clients/recaptcha/client.rb', line 15

def get_without_bypass(url, **options, &block)
  request :get, url, **options, &block
end