two_captcha 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29bc40bcdecf08c3315a97224e2dbc0b7308f737
4
- data.tar.gz: f16d6172e691101d63534746c83da27d109abdb0
3
+ metadata.gz: b6301e1e7e1da13c43d29f53d7e11b79ec5eebca
4
+ data.tar.gz: f0fbd0102bce7465dd5bde5579bb1cf37fa318ce
5
5
  SHA512:
6
- metadata.gz: 36c9c2bd793aba1dda0b4ce7414ab2b56ae5193c314714f6b2b33f22cec13ecc8ffbf29ac0fb997b866890079b3131b316a26c5a05274bc300e55d93072f6573
7
- data.tar.gz: 0d7d9a545bdfa066e551031a824129635ca4b4f2639de54204bb2d7d2beeb8a9fc40b93e51bc1eba051836534b68ead71a595dff9be271300b1b6aa327710de3
6
+ metadata.gz: 90125e1512e0a06e196ac13d046d487b54a8893d49ca898ee7858de340e2507dac17e410d3a6cd8e70658893af10bbaa7a8a76519c216d5a9a99984a5728890a
7
+ data.tar.gz: 5f315e743b1521c3c062ae1f9138e2a6e180f6e776378c2f1ab0efada8edb0b8f37b29b85fc4294eb38178c4c86027c79a6a40c3157376f1d1ca2ef9ebbfec7b
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Developed by [Infosimples](https://infosimples.com), a [big data company](https://infosimples.com/en/data-engineering).
1
+ Developed by [Infosimples](https://infosimples.com).
2
2
 
3
3
  # TwoCaptcha
4
4
 
@@ -14,6 +14,18 @@ module TwoCaptcha
14
14
  end
15
15
  end
16
16
 
17
+ class Timeout < Error
18
+ def initialize
19
+ super('The captcha was not solved in the expected time')
20
+ end
21
+ end
22
+
23
+ class GoogleKey < Error
24
+ def initialize
25
+ super('Missing googlekey parameter')
26
+ end
27
+ end
28
+
17
29
  class WrongUserKey < Error
18
30
  def initialize
19
31
  super('Wrong “key” parameter format, it should contain 32 symbols')
@@ -92,15 +104,27 @@ module TwoCaptcha
92
104
  end
93
105
  end
94
106
 
95
- class Timeout < Error
107
+ class CaptchaImageBlocked < Error
96
108
  def initialize
97
- super('The captcha was not solved in the expected time')
109
+ super('You have sent an image, that is unrecognizable and which is saved in our database as such. Usually this happens when the site where you get the captcha from has stopped sending you captcha and started giving you a “deny access” cap.')
98
110
  end
99
111
  end
100
112
 
101
- class GoogleKey < Error
113
+ class WrongCaptchaId < Error
102
114
  def initialize
103
- super('Missing googlekey parameter')
115
+ super('You are trying to get the answer or complain a captcha that was submitted more than 15 minutes ago.')
116
+ end
117
+ end
118
+
119
+ class BadDuplicates < Error
120
+ def initialize
121
+ super('Error is returned when 100% accuracy feature is enabled. The error means that max numbers of tries is reached but min number of matches not found.')
122
+ end
123
+ end
124
+
125
+ class ReportNotRecorded < Error
126
+ def initialize
127
+ super('Error is returned to your complain request (reportbad) if you already complained lots of correctly solved captchas.')
104
128
  end
105
129
  end
106
130
 
@@ -118,6 +142,10 @@ module TwoCaptcha
118
142
  'ERROR_WRONG_ID_FORMAT' => TwoCaptcha::WrongIdFormat,
119
143
  'ERROR_CAPTCHA_UNSOLVABLE' => TwoCaptcha::CaptchaUnsolvable,
120
144
  'ERROR_EMPTY_ACTION' => TwoCaptcha::EmptyAction,
121
- 'ERROR_GOOGLEKEY' => TwoCaptcha::GoogleKey
145
+ 'ERROR_GOOGLEKEY' => TwoCaptcha::GoogleKey,
146
+ 'ERROR_CAPTCHAIMAGE_BLOCKED' => TwoCaptcha::CaptchaImageBlocked,
147
+ 'ERROR_WRONG_CAPTCHA_ID' => TwoCaptcha::WrongCaptchaId,
148
+ 'ERROR_BAD_DUPLICATES' => TwoCaptcha::BadDuplicates,
149
+ 'REPORT_NOT_RECORDED' => TwoCaptcha::ReportNotRecorded,
122
150
  }
123
151
  end
@@ -1,4 +1,4 @@
1
1
  module TwoCaptcha
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  USER_AGENT = "TwoCaptcha/Ruby v#{VERSION}"
4
4
  end
data/two_captcha.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'two_captcha/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "two_captcha"
8
8
  spec.version = TwoCaptcha::VERSION
9
- spec.authors = ["Marcelo Mita", "Rafael Barbolo"]
9
+ spec.authors = ["Rafael Barbolo", "Rafael Ivan Garcia"]
10
10
  spec.email = ["team@infosimples.com.br"]
11
11
  spec.summary = %q{Ruby API for 2Captcha (Captcha Solver as a Service)}
12
12
  spec.description = %q{TwoCaptcha allows you to solve captchas with manual labor}
@@ -14,7 +14,11 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+
18
+ # Since our currently binstubs are used only during the gem's development, we
19
+ # are ignoring them in the gem specification.
20
+ # spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+
18
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
23
  spec.require_paths = ["lib"]
20
24
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: two_captcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
- - Marcelo Mita
8
7
  - Rafael Barbolo
8
+ - Rafael Ivan Garcia
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-18 00:00:00.000000000 Z
12
+ date: 2017-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -56,9 +56,7 @@ dependencies:
56
56
  description: TwoCaptcha allows you to solve captchas with manual labor
57
57
  email:
58
58
  - team@infosimples.com.br
59
- executables:
60
- - console
61
- - setup
59
+ executables: []
62
60
  extensions: []
63
61
  extra_rdoc_files: []
64
62
  files:
@@ -105,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
103
  version: '0'
106
104
  requirements: []
107
105
  rubyforge_project:
108
- rubygems_version: 2.5.1
106
+ rubygems_version: 2.4.3
109
107
  signing_key:
110
108
  specification_version: 4
111
109
  summary: Ruby API for 2Captcha (Captcha Solver as a Service)