Skip to content

Commit 0902094

Browse files
added data-s recaptcha optional parameter
1 parent 94b3755 commit 0902094

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

example.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_api
3535
# d['v3_action'] = 'homepage' # action to use when solving v3 - optional
3636
# d['proxy'] = '126.45.34.53:123' # - HTTP proxy - optional
3737
# d['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' # optional
38+
# d['data-s'] = 'recaptcha data-s value' # optional
3839
captcha_id = ita.submit_recaptcha d
3940

4041
puts "Waiting for recaptcha to be solved ..."

lib/imagetyperzapi.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ def submit_recaptcha(d)
292292
if d.key? 'v3_min_score'
293293
data['score'] = d['v3_min_score']
294294
end
295+
if d.key? 'data-s'
296+
data['data-s'] = d['data-s']
297+
end
298+
295299

296300
# make request
297301
http = Net::HTTP.new(ROOT_DOMAIN, 80)

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ d['v3_min_score'] = 0.3 # min score to target when solving v3 - optiona
7676
d['v3_action'] = 'homepage' # action to use when solving v3 - optional
7777
d['proxy'] = '126.45.34.53:123' # - optional
7878
d['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' # optional
79+
d['data-s'] = 'recaptcha data-s value' # optional
7980
captcha_id = ita.submit_recaptcha d
8081
```
8182
This method returns a captchaID. This ID will be used next, to retrieve the g-response, once workers have

0 commit comments

Comments
 (0)