E
E
El_buen_hombre2016-07-19 21:14:40
Python
El_buen_hombre, 2016-07-19 21:14:40

Python3, vk API, how to get captcha from vk module?

Good afternoon!
I am new to programming and still learning. A similar question has already been asked here, but there was no answer.
With the help of the vk module, I started to learn api vk in python.
I got to the point where it became necessary to work with captcha, but I don’t know how to get it.
The only thing the module gives me is VkAPIError: 14. Captcha needed. request_params = {'user_id': '356065447', 'oauth': '1', 'method': 'friends.add'}.
To process captchas, the following must be transmitted:
captcha_sid - received identifier
captcha_key - text entered by the user, The
question is where to get them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Titusov, 2016-07-28
@denis-titusov

See how it's done here: vk.readthedocs.io/en/latest/_modules/vk/api
There, along with an error, it is transmittedcaptcha_response

...
                    captcha_response = {
                        'sid': error.captcha_sid,
                        'key': captcha_key,
                    }
                    return self.make_request(method_request, captcha_response=captcha_response)
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question