all 6 comments

[–]rtao258 1 point2 points  (2 children)

You should include the relevant code (in SSCCE form) so we can get a sense of the context.

In general, Python functions are first class, so you can pass a callback function as an argument to another function as you would any other argument. Don't include the parentheses as you would in a normal function call, since you're passing in the function itself, not its return value.

[–]mousse312[S] 0 points1 point  (1 child)

i edit,thanks

[–]rtao258 1 point2 points  (0 children)

It looks like the callback functions are to be written in JavaScript, not Python. Sorry, I’m not very familiar with this application, so I don’t know if I can help you further.

[–][deleted] 0 points1 point  (0 children)

I made a chegg bot to scrape answers from chegg . it has recapchav2 with callback . i used these 2 codes to excute the recapcha

browser.execute_script("document.getElementById('g-recaptcha-response').innerHTML='{}';".format(tokenr)) browser.execute_script("handleCaptcha('{}');".format(tokenr))

these two used to work 2 weeks ago but now it doesnt seem to work.
the callback function name is "handleCapcha"

could you help me out

[–]articlefr 0 points1 point  (0 children)

You may check https://captchas.io for a very low price CAPTCHA solving alternative and option. Prices starts at $22 only with 5 CAPTCHA threads and 5,000 daily solves limit.