From abe90582de8f4268468f4315573eb0fd40dff689 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Tue, 19 Mar 2019 23:22:30 +0100 Subject: [PATCH] eHentai content warning fixed --- TODO.md | 2 +- changelog-fr.md | 1 + changelog.md | 1 + src/be/nikiroo/fanfix/supported/EHentai.java | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index bdf5cf6e..8feb5c5a 100644 --- a/TODO.md +++ b/TODO.md @@ -81,7 +81,7 @@ My current planning for Fanfix (but not everything appears on this list): - [ ] Bugs - [x] Fix "Redownload also reset the source" - [ ] Fix "Redownload remote does not show the new item before restart of client app" - - [ ] Fix eHentai "content warning" access (see 455) + - [x] Fix eHentai "content warning" access (see 455) - [ ] Fix the configuration system (for new or changed options, new or changed languages) - [ ] remote import also download the file in cache, why? - [x] import file in remote mode tries to import remote file!! diff --git a/changelog-fr.md b/changelog-fr.md index 667de9fd..ff931269 100644 --- a/changelog-fr.md +++ b/changelog-fr.md @@ -14,6 +14,7 @@ - fix: deadlock dans certains cas rares (nikiroo-utils) - fix: le résumé n'était pas visibe dans certains cas - fix: update de nikiroo-utils, meilleures perfs pour le remote +- fix: eHentai content warning # Version 1.8.1 diff --git a/changelog.md b/changelog.md index 817d49a5..f509f96f 100644 --- a/changelog.md +++ b/changelog.md @@ -14,6 +14,7 @@ - fix: deadlock in some rare cases (nikiroo-utils) - fix: the resume was not visible in some cases - fix: update nikiroo-utils, better remote perfs +- fix: eHentai content warning # Version 1.8.1 diff --git a/src/be/nikiroo/fanfix/supported/EHentai.java b/src/be/nikiroo/fanfix/supported/EHentai.java index 9a09f077..1947620a 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; @@ -79,6 +80,14 @@ class EHentai extends BasicSupport_Deprecated { return true; } + @Override + public Map getCookies() { + // TODO Auto-generated method stub + Map cookies = super.getCookies(); + cookies.put("nw", "1"); + return cookies; + } + private Image getCover(URL source, InputStream in) { Image author = null; String coverLine = getKeyLine(in, "