Skip to content

ukolovda/captchabot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wrapper for captchabot API

Cloned from Antigate GEM

Usage

Recognize captcha

captcha = Captchabot.wrapper(KEY)
captcha.phrase = 0 or 1 (0 default, 1 marks that at captcha 2-4 words)
captcha.regsense = 0 or 1 (0 default, 1 marks that text captcha is case sensitive)
captcha.numeric = 0 or 1 or 2 (0 default, 1 marks that text captcha consists only of numbers, 2 marks that on captcha no digit)
captcha.calc = 0 or 1 (0 default, 1 marks that digit  on captcha should be folded)
captcha.min_len = 0..20 (0 default, minimum length text captcha)
captcha.max_len = 0..20 (0 - unlimited, maximum length text captcha)
recognized = captcha.recognize(URL, EXT)
puts recognized[0] # ID recognized CAPTCHA
puts recognized[1] # Text CAPTCHA

Example

captcha = Captchabot.wrapper('660aaf58948bae3fa81362ef71b9ebcc')
captcha.phrase = 1
recognized = captcha.recognize('http://www.google.com/recaptcha/api/image?c=03AHJ_Vuu-Kun_wMo4M8JiWA87K6awfoiUxJCUF9KkQq3tCfyxjYELhHcsIJrcJ_qgqIQQsBw5vWAkpHBqP4VEHv1nwtoAnD5uZvwzHknOFyID4OrX0_6q8QXQ5TwkRn7qBxdt3QdX6D8NvPcFHFHzmEhu1yCJJQfTwQ', 'jpg')
puts recognized[1]

Get balance

puts Captchabot.balance(KEY)

Mark as bad

captcha = Captchabot.wrapper('660aaf58948bae3fa81362ef71b9ebcc')
captcha.bad 'ID recognized CAPTCHA'

Example

puts Captchabot.balance('660aaf58948bae3fa81362ef71b9ebcc')

About

Wrapper for Antigate API

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%