Download captcha image through element

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
OM_Lhamas
Posts: 3
Joined: 10 Aug 2018, 15:42

Download captcha image through element

10 Aug 2018, 15:58

Hi, I have to register hundreds of data every day and I have been trying to create a script to quickly download the captcha from the website. I don't want to manipulate the page or change anything, I just want to get the element and download the image or a ss of or something like that, so I can upload to Death By Captcha (currently using their command-line tool). I can right click the captcha itself and 'Save Image as...' but it is just way too slow.
Keep in mind that I'm a n00b and I know very little about programming.
This is the html code that I get from 'Inspect Element':

<img id="identificacao-form:idCaptcha:j_idt220" src="/javax.faces.resource/dynamiccontent.properties.jsf?ln=primefaces&pfdrid=5SVKvQrbpnnQ%2Bp%2B1DV8qP5suPv55IKBfn7L%2BJc0YEhA%3D&pfdrid_c=false&ts=1533934578932" alt="" class="curr_img">
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: Download captcha image through element

11 Aug 2018, 02:33

Which service are you using that is prompting the captcha?
"Nothing is quieter than a loaded gun." - Heinrich Heine
OM_Lhamas
Posts: 3
Joined: 10 Aug 2018, 15:42

Re: Download captcha image through element

11 Aug 2018, 15:38

It's a bank system for credit registration. To make things clear, I'm not trying to do anything illegal or edgy, I'm doing a job for them and I have to insert the info about their clients that I get from a spreadsheet. I'm just trying to be more efficient.
I found this example (http://scraping.pro/example-captcha-solver-java/) but I'm not sure how to adapt it for my needs, I just need the "Getting the Captcha Image", but I'm super confused with the Selenium Webdriver and which one I should download/how to install it.
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: Download captcha image through element

11 Aug 2018, 16:23

I’m not very familiar with DeathByCaptcha, but don’t you have to pay for it? If you are doing a job for the bank, don’t you think they can provide you some kind of captcha-free access? Maybe to would be better for both sides?

Bypassing Captchas is obviously against website terms of service, but as far as I know in itself it is not illegal.

I’ll trust you on the issue, also because I’m sure you would find the information anyway, since your problem is basically extracting a image.

It’s not sufficient to download the image by its source property link, since the captcha will be newly generated on each request. Are you retrieving the website by downloading it manually, or are you trying to automate the process “in-browser”?
"Nothing is quieter than a loaded gun." - Heinrich Heine
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: Download captcha image through element

11 Aug 2018, 17:06

Seeing it now, this also might be interesting for you: https://autohotkey.com/boards/viewtopic.php?f=7&t=32323
"Nothing is quieter than a loaded gun." - Heinrich Heine
OM_Lhamas
Posts: 3
Joined: 10 Aug 2018, 15:42

Re: Download captcha image through element

11 Aug 2018, 17:56

Alibaba wrote:I’m not very familiar with DeathByCaptcha, but don’t you have to pay for it? If you are doing a job for the bank, don’t you think they can provide you some kind of captcha-free access? Maybe to would be better for both sides?
Yes I do pay for it and I am able to upload the captcha image through a simple cmd that returns the solved captcha. I will try to ask for a captcha-free access, but this is a very commonly outsourced (or third-party? Don't know how to call it in english) job and I doubt they would open an exception for me, or even if they are able to do it, these bank systems tend be a bit messy :/
Alibaba wrote:Are you retrieving the website by downloading it manually, or are you trying to automate the process “in-browser”?
Not sure if I fully understood your question. I would like to automate the process of creating the image file, and I believe that I have to extract the element in-browser in order to get the current captcha image, like the java example that I sent does. As you said, they are generated on each request.
Alibaba wrote:Seeing it now, this also might be interesting for you: https://autohotkey.com/boards/viewtopic.php?f=7&t=32323
I will take a look at these videos, they sound very promising, my only concern is that these Selenium links look outdated, I don't know if they will work with updated browsers :think: But I will give it a shot, thank you very much for helping me out!
Alibaba
Posts: 480
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: Download captcha image through element

12 Aug 2018, 03:47

tmplinshi wrote:If you are using IE browser:

WBImg - Get WebBrowser image without redownloading
This seems very much like a better choice!
"Nothing is quieter than a loaded gun." - Heinrich Heine

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Giresharu, Google [Bot] and 269 guests