Skip to content
Advertisement

solving recaptcha without a form submit/ button click ( uses callback )

im trying to solve a recaptcha from a website im trying to scrape

usually the way it works is , captcha is inside a form , i’ll send the captcha data to a solving captcha api (im using DBC) , they return a token

i put the token inside captcha input (#g-recaptcha-response) and even tho the green check doesn’t show up when i submit the form it will get accepted

but this website automatically shows the information i want to scrape as soon as captcha is solved in another way when the green check of captcha shows up , the page get updated with new information

so my question is when i put the token inside captcha input is there any way to trigger captcha solved event (or whatever happens when green check shows up .. im guessing some sort of callback ) without submitting the form ?

edit :

by exploring recaptcha configuration exploring i found this

JavaScript

which points to this

JavaScript

but im not sure how to invoke it

JavaScript

Advertisement

Answer

i found the answer , just in case anyone has this problem just in your browser console play with this object ___grecaptcha_cfg to find the callback mine was here

JavaScript

but it can have different structure for other websites

so basically after i recived the token and put it in the #g-recaptcha-response` i called this function and passed the token as argument

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement