git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Partially fix YiffStar support
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
BasicSupport.java
diff --git
a/src/be/nikiroo/fanfix/supported/BasicSupport.java
b/src/be/nikiroo/fanfix/supported/BasicSupport.java
index 129182208f29f0ce70d46ffb70053231d0792a30..b528cac819acea887acfc28f861b9c32221d1971 100644
(file)
--- 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;
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.
/**
* 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
* it.
*
* @return the cookies
+ *
+ * @throws IOException
+ * in case of I/O error
*/
*/
- public Map<String, String> getCookies() {
+ public Map<String, String> getCookies()
throws IOException
{
return new HashMap<String, String>();
}
return new HashMap<String, String>();
}
@@
-304,6
+317,8
@@
public abstract class BasicSupport {
*/
protected Story processMeta(URL url, boolean close, boolean getDesc)
throws IOException {
*/
protected Story processMeta(URL url, boolean close, boolean getDesc)
throws IOException {
+ login();
+
url = getCanonicalUrl(url);
setCurrentReferer(url);
url = getCanonicalUrl(url);
setCurrentReferer(url);