X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FEHentai.java;h=3c734329e3bac03e456665958b6699cc623b3ff8;hb=1387a30ab59dbf4071f2c5e5e0e08ca98c75b726;hp=9a09f077bf82b2145bd7242d52fbbb1b0d8cc266;hpb=ce297a794b1b7d3aa4e9234a6511dd9fe7216656;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/EHentai.java b/src/be/nikiroo/fanfix/supported/EHentai.java index 9a09f07..3c73432 100644 --- a/src/be/nikiroo/fanfix/supported/EHentai.java +++ b/src/be/nikiroo/fanfix/supported/EHentai.java @@ -7,6 +7,7 @@ import java.net.URL; import java.util.AbstractMap; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Map.Entry; import java.util.Scanner; @@ -25,11 +26,6 @@ import be.nikiroo.utils.StringUtils; * @author niki */ class EHentai extends BasicSupport_Deprecated { - @Override - public String getSourceName() { - return "e-hentai.org"; - } - @Override protected MetaData getMeta(URL source, InputStream in) throws IOException { MetaData meta = new MetaData(); @@ -38,9 +34,9 @@ class EHentai extends BasicSupport_Deprecated { meta.setAuthor(getAuthor(reset(in))); meta.setDate(getDate(reset(in))); meta.setTags(getTags(reset(in))); - meta.setSource(getSourceName()); + meta.setSource(getType().getSourceName()); meta.setUrl(source.toString()); - meta.setPublisher(getSourceName()); + meta.setPublisher(getType().getSourceName()); meta.setUuid(source.toString()); meta.setLuid(""); meta.setLang(getLang(reset(in))); @@ -58,7 +54,7 @@ class EHentai extends BasicSupport_Deprecated { // There is no chapters on e621, just pagination... Story story = super.process(url, pg); - Chapter only = new Chapter(1, null); + Chapter only = new Chapter(1, ""); for (Chapter chap : story) { only.getParagraphs().addAll(chap.getParagraphs()); } @@ -79,6 +75,13 @@ class EHentai extends BasicSupport_Deprecated { return true; } + @Override + public Map getCookies() { + Map cookies = super.getCookies(); + cookies.put("nw", "1"); + return cookies; + } + private Image getCover(URL source, InputStream in) { Image author = null; String coverLine = getKeyLine(in, "