public class DecaptcherDecoder extends ImageDecoder
| Modifier and Type | Field and Description |
|---|---|
static java.util.List<java.lang.String> |
VALID_API_URLS |
session| Constructor and Description |
|---|
DecaptcherDecoder(ScrapingSession session,
java.lang.String username,
java.lang.String password,
int port)
Create a decoder that uses the de-captcher.com service.
|
DecaptcherDecoder(ScrapingSession session,
java.lang.String username,
java.lang.String password,
int port,
java.lang.String apiURL)
Create a decoder that uses the de-captcher.com service.
|
DecaptcherDecoder(ScrapingSession session,
java.lang.String username,
java.lang.String password,
java.lang.String port)
Create a decoder that uses the de-captcher.com service.
|
DecaptcherDecoder(ScrapingSession session,
java.lang.String username,
java.lang.String password,
java.lang.String port,
java.lang.String apiURL)
Create a decoder that uses the de-captcher.com service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes any resources associated with the decoder.
|
DecodedImage |
decodeFile(java.io.File file)
Converts the image given to a DecodedImage that will handle it.
|
double |
getBalance()
Returns the current balance of the account (if it can be accessed via the API).
|
decodeFile, decodeURL, setAutoCloseAfterScrapeEnds@NotNull public static final java.util.List<java.lang.String> VALID_API_URLS
public DecaptcherDecoder(ScrapingSession session, java.lang.String username, java.lang.String password, int port)
session - The current scraping session. Used for downloading images with the decodeURL method.username - The username for the de-captcher accountpassword - The password for the de-captcher accountport - The port parameter for de-captcher, which can be found for your account by logging into their sitepublic DecaptcherDecoder(ScrapingSession session, java.lang.String username, java.lang.String password, @NotNull java.lang.String port)
session - The current scraping session. Used for downloading images with the decodeURL method.username - The username for the de-captcher accountpassword - The password for the de-captcher accountport - The port parameter for de-captcher, which can be found for your account by logging into their sitepublic DecaptcherDecoder(ScrapingSession session, java.lang.String username, java.lang.String password, @NotNull java.lang.String port, java.lang.String apiURL)
session - The current scraping session. Used for downloading images with the decodeURL method.username - The username for the de-captcher accountpassword - The password for the de-captcher accountport - The port parameter for de-captcher, which can be found for your account by logging into their siteapiURL - The api url you wish to connect with, if different than the defaultpublic DecaptcherDecoder(ScrapingSession session, java.lang.String username, java.lang.String password, int port, java.lang.String apiURL)
session - The current scraping session. Used for downloading images with the decodeURL method.username - The username for the de-captcher accountpassword - The password for the de-captcher accountport - The port parameter for de-captcher, which can be found for your account by logging into their siteapiURL - The api url you wish to connect with, if different than the defaultpublic void close()
ImageDecoderclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class ImageDecoder@NotNull public DecodedImage decodeFile(@NotNull java.io.File file)
ImageDecoderdecodeFile in class ImageDecoderfile - The image filepublic double getBalance()
ImageDecodergetBalance in class ImageDecoder