import be.nikiroo.fanfix.data.Chapter;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.fanfix.data.Story;
import be.nikiroo.fanfix.data.Chapter;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.fanfix.data.Story;
meta.setType(getType().toString());
meta.setImageDocument(true);
meta.setCover(getCover(source));
meta.setType(getType().toString());
meta.setImageDocument(true);
meta.setCover(getCover(source));
Chapter only = new Chapter(1, null);
for (Chapter chap : story) {
Chapter only = new Chapter(1, null);
for (Chapter chap : story) {
InputStream in = Instance.getCache().open(source, this, true);
String images = getChapterContent(new URL(source.toString() + "?page="
InputStream in = Instance.getCache().open(source, this, true);
String images = getChapterContent(new URL(source.toString() + "?page="
if (pos >= 0) {
images = images.substring(1, pos - 1);
return getImage(this, null, images);
if (pos >= 0) {
images = images.substring(1, pos - 1);
return getImage(this, null, images);
String title = getLine(in, "<title>", 0);
if (title != null) {
int pos = title.indexOf('>');
String title = getLine(in, "<title>", 0);
if (title != null) {
int pos = title.indexOf('>');
- protected List<Entry<String, URL>> getChapters(URL source, InputStream in)
- throws IOException {
+ protected List<Entry<String, URL>> getChapters(URL source, InputStream in,
+ Progress pg) throws IOException {
List<Entry<String, URL>> urls = new ArrayList<Entry<String, URL>>();
int last = 1; // no pool/show when only one page
List<Entry<String, URL>> urls = new ArrayList<Entry<String, URL>>();
int last = 1; // no pool/show when only one page
final String key = Integer.toString(i);
final URL value = new URL(source.toString() + "?page=" + i);
urls.add(new Entry<String, URL>() {
final String key = Integer.toString(i);
final URL value = new URL(source.toString() + "?page=" + i);
urls.add(new Entry<String, URL>() {
- protected String getChapterContent(URL source, InputStream in, int number)
- throws IOException {
+ protected String getChapterContent(URL source, InputStream in, int number,
+ Progress pg) throws IOException {
StringBuilder builder = new StringBuilder();
String staticSite = "https://static1.e621.net";
if (source.getHost().contains("e926")) {
StringBuilder builder = new StringBuilder();
String staticSite = "https://static1.e621.net";
if (source.getHost().contains("e926")) {