B
B
Bergis2019-09-07 10:26:41
Python
Bergis, 2019-09-07 10:26:41

How to extract image from captcha?

How can I extract a captcha image? If you parse the link to the picture, then there will already be another ..5d735b894c949423310242.png5d735b9bce0d0654097370.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Yakushenko, 2019-09-07
@Bergis

captcha_img = driver.find_element_by_xpath('.//img[@class="js-captcha-img b-captcha__captcha"]')
captcha_base64 = captcha_img.screenshot_as_base64

The captcha_base64base64 of the image will be saved in, you can make sure that it is correct here - insert the text from the variable and check if the image is correct. If yes, then captcha_base64send this one to the captcha service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question