mirror of
https://github.com/Rogiel/httpchannel
synced 2025-12-05 23:22:51 +00:00
Implements uploadhere.com service
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
package com.rogiel.httpchannel.captcha;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
@@ -17,8 +18,10 @@ public interface ImageCaptchaService<C extends ImageCaptcha> extends
|
||||
* @param image
|
||||
* the image {@link URL}
|
||||
* @return a new captcha
|
||||
* @throws MalformedURLException
|
||||
* if any error occur while creating the Image {@link URL}
|
||||
*/
|
||||
C create(String html);
|
||||
C create(String html) throws MalformedURLException;
|
||||
|
||||
/**
|
||||
* Tries to automatically resolve the captcha
|
||||
|
||||
@@ -43,7 +43,7 @@ public abstract class AbstractService implements Service {
|
||||
this.captchaResolver = captchaResolver;
|
||||
}
|
||||
|
||||
protected boolean resolveCaptcha(Captcha captcha)
|
||||
protected void resolveCaptcha(Captcha captcha)
|
||||
throws UnresolvedCaptchaException {
|
||||
if (captchaResolver == null)
|
||||
throw new UnresolvedCaptchaException();
|
||||
@@ -51,6 +51,5 @@ public abstract class AbstractService implements Service {
|
||||
throw new UnresolvedCaptchaException();
|
||||
if (captcha.getAnswer() == null)
|
||||
throw new UnresolvedCaptchaException();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user