Skip to content
This repository was archived by the owner on Mar 5, 2021. It is now read-only.

Commit 4efb831

Browse files
added hCaptcha
1 parent 3077780 commit 4efb831

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_api():
3131
# check https://github.com/imagetyperz-api/API-docs#submit-recaptcha for more details
3232
# -----------------------------------------------------------------------------------------------
3333
recaptcha_params = {
34-
'page_url' : 'page_url_here',
34+
'page_url' : 'page_url_here', # add --capy or --hcaptcha at the end, to submit capy or hCaptcha
3535
'sitekey' : 'sitekey_here',
3636
'type' : 1, # optional, 1 - normal recaptcha, 2 - invisible recaptcha, 3 - v3 recaptcha, default: 1
3737
#'v3_min_score' : .1, # optional

readme.md

+24-5
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,34 @@ print (geetest_response)
145145
```
146146

147147
Response will look like this: `{'challenge': '...', 'validate': '...', 'seccode': '...'}`
148+
## Capy & hCaptcha
148149

149-
## Capy
150+
This are two different captcha types, but both are similar to reCAPTCHA. They require a `pageurl` and `sitekey` for solving. hCaptcha is the newest one.
150151

151-
This captcha requires a `page_url` and `sitekey` in order to be solved by our system.
152-
Currently, in order to solve a capy captcha, you'll have to use the reCAPTCHA methods and only add `--capy` at the end of the `page_url`.
153-
Having that up, our system will pick it up as capy. Once workers have solved it, you'll have to use the reCAPTCHA retrieve endpoint, to get the response.
152+
### IMPORTANT
153+
For this two captcha types, the reCAPTCHA methods are used (explained above), except that there's one small difference.
154154

155-
**E.g** Original page url - `https://mysite.com`, capy page url `https://mysite.com--capy`
155+
The `pageurl` parameter should have at the end of it `--capy` added for Capy captcha and `--hcaptcha` for the hCaptcha. This instructs our system it's a capy or hCaptcha. It will be changed in the future, to have it's own endpoints.
156156

157+
For example, if you were to have the `pageurl` = `https://mysite.com` you would send it as `https://mysite.com--capy` if it's capy or `https://mysite.com--hcaptcha` for hCaptcha. Both require a sitekey too, which is sent as reCAPTCHA sitekey, and response is received as reCAPTCHA response, once again using the reCAPTCHA method.
158+
159+
#### Example
160+
```python
161+
# submit
162+
p = {
163+
'page_url' :'domain.com--capy', # or `domain.com--hcaptcha`
164+
'sitekey': 'sitekey_goes_here',
165+
}
166+
captcha_id = ita.submit_recaptcha(p)
167+
168+
# retrieve
169+
print ('Capy captcha ID: {}'.format(captcha_id))
170+
print ('Waiting for capy to be solved...')
171+
while ita.in_progress():
172+
sleep(10)
173+
solution = ita.retrieve_recaptcha(captcha_id)
174+
print (solution)
175+
```
157176

158177
## Other methods/variables
159178

0 commit comments

Comments
 (0)