Example request:
{
"clientKey": "API_KEY",
"task": {
"type": "ComplexImageTask",
"class": "recognition",
"imagesBase64": [
"{image_1_Base64}",
"{image_2_Base64}",
"{image_3_Base64}",
"{image_4_Base64}",
"{image_5_Base64}",
"{image_6_Base64}",
"{image_7_Base64}",
"{image_8_Base64}",
"{image_9_Base64}",
],
"metadata": {
"Task": "betpunch_3x3_rotate"
}
}
}
In the "Task" field, specify betpunch_3x3_rotate. To get the result, use the getTaskResult method, as shown in the previous examples. In response, if the solution is successful, you will receive an array of numbers representing the CAPTCHA solution. This JSON response should be used to confirm the solution. Here’s an example of how this can be implemented with Selenium:
from selenium import webdriver
# Example of using the JSON response
rotation_values = [4,4,4,4,4,3,1,2,2]
# Then use Selenium for clicks or data input
Recommendations for Successful Solving
We have covered the main steps for automatically solving image CAPTCHAs using CapMonster Cloud. However, you can further simplify this process and make it more convenient. Let's look at a few useful recommendations:
Using SDK
CapMonster Cloud provides its own libraries for developers, significantly reducing the amount of code compared to using standard HTTP libraries. They support various programming languages, including Python, JavaScript, C#, and others. This makes integration convenient for developers with different technology stacks. With ready-made methods for creating tasks and receiving results, developers don’t need to form long HTTP requests, process responses for long periods, or manage timeouts. This simplifies the process of working with the service and improves code stability. You can find examples and integration templates in the documentation.
In the click method, manually searching for and extracting parameters for the request to CapMonster Cloud is very inconvenient. In this case, automation can be used, for example, with Selenium. The script will automatically find the task text (e.g., "Click on traffic lights"), determine the grid size (3x3 or 4x4), and extract image URLs. These data are then passed to CapMonster Cloud for solving the CAPTCHA. This approach significantly speeds up the solving process.
Working with Proxies
Some websites may block CAPTCHA solutions if all requests come from the same IP address. Using proxies helps avoid this, providing greater anonymity and increasing the chance of successfully passing the CAPTCHA. Use reliable proxies with high speed; select geographically suitable IP addresses if the site checks location.
Improving Request Speed
To speed up CAPTCHA processing, you can send multiple tasks in parallel. It is recommended to break the solutions into separate threads (multithreading), use asynchronous requests (such as asyncio in Python), and reduce delays between requests, but avoid making them too frequent to prevent blocking.
By following the main steps and recommendations outlined in this article, you will be able to significantly simplify the CAPTCHA solving process, reduce the likelihood of blocks, and speed up data collection. If you have any questions or want to learn more about specific methods, we recommend exploring the official CapMonster Cloud documentation and trying the integration in practice!
NB: As a reminder, the product is used to automate testing on your own sites and on sites to which you have legal access.