X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FBasicSupport.java;h=b528cac819acea887acfc28f861b9c32221d1971;hp=129182208f29f0ce70d46ffb70053231d0792a30;hb=6e06d2cc9bf068a8ec4ad105aaef955a6eb509a1;hpb=a4143cd74a90e17a811a4581cbeb213fed1f6304 diff --git a/src/be/nikiroo/fanfix/supported/BasicSupport.java b/src/be/nikiroo/fanfix/supported/BasicSupport.java index 1291822..b528cac 100644 --- a/src/be/nikiroo/fanfix/supported/BasicSupport.java +++ b/src/be/nikiroo/fanfix/supported/BasicSupport.java @@ -243,6 +243,16 @@ public abstract class BasicSupport { protected abstract String getChapterContent(URL source, InputStream in, int number) throws IOException; + /** + * Log into the support (can be a no-op depending upon the support). + * + * @throws IOException + * in case of I/O error + */ + public void login() throws IOException { + + } + /** * Return the list of cookies (values included) that must be used to * correctly fetch the resources. @@ -251,8 +261,11 @@ public abstract class BasicSupport { * it. * * @return the cookies + * + * @throws IOException + * in case of I/O error */ - public Map getCookies() { + public Map getCookies() throws IOException { return new HashMap(); } @@ -304,6 +317,8 @@ public abstract class BasicSupport { */ protected Story processMeta(URL url, boolean close, boolean getDesc) throws IOException { + login(); + url = getCanonicalUrl(url); setCurrentReferer(url);