R
R
Roman Agagulov2021-08-11 04:12:04
API
Roman Agagulov, 2021-08-11 04:12:04

When working with vk_api in python, a captcha error occurred. What to do?

61132313429c4183753373.png
I calmly wrote a python code for myself, wrote a code to replace the VK avatar (it doesn’t matter why), then I replaced it many times (without any timeout), after that a captcha error came out. I tried more than once to go to the page and replace the ava myself, in the hope that the captcha would jump. now I don't know what to do. I can do it myself through the profile, but through vk_api it asks for a captcha.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UberPool, 2021-08-11
@RoMoN0975

Well, so you make a lot of requests, and a captcha arises. Screw the captcha solving service to process it or solve it yourself.
An example of captcha processing.

try:
#code ... 
except vk_api.exceptions.Captcha as captcha:
    print(f'Появилась капча - {captcha.get_url()}')
    captcha_key = input('Введите капчу:')
    captcha.try_again(captcha_key)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question