Skip to content

Commit ca60a35

Browse files
committed
- Added a description for the send method and an example of manually sending a captcha for send to README.md
- Added description of the method parameter for send() in solver.py Signed-off-by: Maxim S <poplers24@gmail.com>
1 parent d98ac49 commit ca60a35

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,11 @@ result = solver.tencent(app_id="197326679",
309309
## Other methods
310310

311311
### send / get_result
312-
These methods can be used for manual captcha submission and answer polling.
312+
These methods can be used for manual captcha submission and answer polling. The `send()` method supports sending any captcha
313+
type, to specify the captcha type you must send value `method` manually, for example `method='hcaptcha'` for solving hCapthca.
314+
You can find the value of the `method` parameter in the [API documentation](https://2captcha.com/2captcha-api).
315+
316+
Example for solving Normal captcha manually:
313317
```python
314318
import time
315319
. . . . .
@@ -318,6 +322,17 @@ import time
318322
id = solver.send(file='path/to/captcha.jpg')
319323
time.sleep(20)
320324

325+
code = solver.get_result(id)
326+
```
327+
Example for solving hCaptcha manually:
328+
```python
329+
import time
330+
. . . . .
331+
id = solver.send(sitekey='41b778e7-8f20-45cc-a804-1f1ebb45c579',
332+
url='https://2captcha.com/demo/hcaptcha?difficulty=easy',
333+
method='hcaptcha')
334+
print(id)
335+
time.sleep(20)
321336
code = solver.get_result(id)
322337
```
323338

twocaptcha/solver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,10 @@ def send(self, **kwargs):
879879
880880
Parameters
881881
_________
882+
method : str
883+
The name of the method must be found in the documentation https://2captcha.com/2captcha-api
882884
kwargs: dict
883-
885+
All captcha params
884886
Returns
885887
886888
"""

0 commit comments

Comments
 (0)