Class to convert images to text for interacting with CAPTCHA challenges. There are currently two implementations:
When a reference to an image is passed to an instance of this class, it returns a DecodedImage object that can be queried for the resulting text, errors, and can report an image as poorly converted.
See example attached.
Requires an account with decaptcher.com.
Type of ImageDecoder in the com.screenscraper.util.images
package that uses the decaptcher.com service to convert images to text. The constructor is DecaptcherDecoder(ScrapingSession session, String username, String password) or DecaptcherDecoder(ScrapingSession session, String username, String password, String apiUrl).
Returns void. If it runs into any problems accessing the decaptcher.com service an error will be thrown.
Version | Description |
---|---|
5.5.29a | Available in all editions |
5.5.40a | Added the port parameter. The service now requires the correct port in order to authenticate. |
Initialization script
Type of ImageDecoder in the com.screenscraper.util.images
package that uses a popup window prompting the user to enter the text read from an image. Useful for debugging purposes, as the input text should always be correct (so long as it is typed correctly). Helpful during testing to avoid costs associated with paid-for CAPTCHA decoding services such as decaptcher.com.
Returns void. If it runs into any problems decoding an image an error will be thrown.
Version | Description |
---|---|
5.5.29a | Available in all editions |
Initialize script
Converts the image given to a DecodedImage that will handle it. Does not delete the file.
A DecodedImage used to get the text, errors, and possibly report a result as bad.
Version | Description |
---|---|
5.5.29a | Available in all editions. |
Converts the image at the given URL to a DecodedImage that will handle it. Temporarily saves the file in the screen-scraper root folder, but deletes it once it has been decoded. By default, this will use the scraping session's HttpClient to request the URL.
A DecodedImage used to get the text, errors, and possibly report a result as bad.
Version | Description |
---|---|
5.5.29a | Available in all editions. |