Skip to content

Commit

Permalink
- Added links to balance and report methods.
Browse files Browse the repository at this point in the history
- Added text to the Error handling block.
- Added a block of Userful articles.

Signed-off-by: Maxim S <[email protected]>
  • Loading branch information
poplers24 committed Jun 24, 2024
1 parent 897334f commit 65adf1e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ result = solver.mtcaptcha(sitekey='MTPublic-KzqLY1cKH',
<sup>[API method description.](https://2captcha.com/2captcha-api#friendly-captcha)</sup>

Friendly Captcha solving method. Returns a token.



> **Important:** To successfully use the received token, the captcha widget must not be loaded on the page. To do this, you need to abort request to `/friendlycaptcha/...module.min.js` on the page. When the captcha widget is already loaded on the page, there is a high probability that the received token will not work.
```python
result = solver.friendly_captcha(sitekey='FCMGEMUD2KTDSQ5H',
url='https://friendlycaptcha.com/demo',
Expand Down Expand Up @@ -415,20 +420,27 @@ code = solver.get_result(id)
```

### balance

<sup>[API method description.](https://2captcha.com/2captcha-api#additional-methods)</sup>

Use this method to get your account's balance
```python
balance = solver.balance()
```

### report

<sup>[API method description.](https://2captcha.com/2captcha-api#complain)</sup>

Use this method to report good or bad captcha answers.
```python
solver.report(id, True) # captcha solved correctly
solver.report(id, False) # captcha solved incorrectly
```

### Error handling
In case of an error, the captcha solver throws an exception. It's important to properly handle these cases. We recommend using `try except` to handle exceptions.
In case of an error, the captcha solver throws an exception. It's important to properly handle these cases. We recommend using `try except` to handle exceptions.
The list of all errors can be found in the [API documentation](https://2captcha.com/2captcha-api#list-of-inphp-errors).
```python
try:
result = solver.text('If tomorrow is Saturday, what day is today?')
Expand Down Expand Up @@ -482,9 +494,14 @@ async def captchaSolver(image):

captcha_result = asyncio.run(captchaSolver(image))
```
## Examples
### Examples
Examples of solving all supported captcha types are located in the [examples] directory.

## Useful articles

- Amazon captcha solver: Code example for bypassing the [Amazon captcha](https://2captcha.com/blog/amazon-captcha-solving)
- [Captcha bypass in Selenium](https://2captcha.com/blog/captcha-bypass-in-selenium)

<!-- Shared links for README.md -->
[2Captcha]: https://2captcha.com/
[2captcha software catalog]: https://2captcha.com/software
Expand Down

0 comments on commit 65adf1e

Please sign in to comment.