Sure Kantu can do this. What the above imacro script does is to
- Extract captcha image with SAVEITEM - in Kantu you can use storeImage instead
- Save image to file (ONDOWNLOAD) - in Kantu use localStorageExport
- Upload image to captcha breaker api. This works the same in Kantu and imacros. For this use the file that you just exported with localStorageExport, e. g. “c:\test\recaptcha\${filename}.png”
- Extract the the characters that are recoginzed from the picture of captcha. iMacros uses TAG… EXTRACT=TXT, in Kantu use storeValue.
- Fill the recognized characters to the verification box, iMacros uses TAG…CONTENT, in Kantu use type.
Here is a demo macro. Of course, it does not work with a captcha breaking service (I do not use these), but it “extracts” a website logo, and then uploads it to online OCR, which is the same workflow, just different website. What the macro also does is to generate a random file name for downloading and uploading with Math.random().toString(36).substring(7);.
{
"CreationDate": "2018-6-13",
"Commands": [
{
"Command": "open",
"Target": "https://ocr.space/",
"Value": ""
},
{
"Command": "comment",
"Target": "Download image (would be the captcha, here it is just a logo)",
"Value": ""
},
{
"Command": "storeEval",
"Target": "Math.random().toString(36).substring(7);",
"Value": "filename"
},
{
"Command": "storeImage",
"Target": "//*[@id=\"logo\"]/img",
"Value": "${filename}.png"
},
{
"Command": "localStorageExport",
"Target": "${filename}.png",
"Value": ""
},
{
"Command": "comment",
"Target": "Upload image (would be catpcha breaking service)",
"Value": ""
},
{
"Command": "open",
"Target": "https://ocr.space/",
"Value": ""
},
{
"Command": "type",
"Target": "id=imageFile",
"Value": "c:\\test\\recaptcha\\${filename}.png"
},
{
"Command": "click",
"Target": "link=Start OCR!",
"Value": ""
},
{
"Command": "comment",
"Target": "Get results",
"Value": ""
},
{
"Command": "pause",
"Target": "3000",
"Value": ""
},
{
"Command": "storeValue",
"Target": "id=txtAreaParsedResult",
"Value": "result"
},
{
"Command": "echo",
"Target": "The text is ${result}",
"Value": ""
}
]
}