From 59e320c8c0814d71b4eaede392f3a55129fd0fcd Mon Sep 17 00:00:00 2001 From: surveyorK Date: Thu, 27 Apr 2017 07:23:25 +0800 Subject: [PATCH 1/3] fix XXBH (77mh) --- src/main/java/jcomicdownloader/module/ParseXXBH.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/jcomicdownloader/module/ParseXXBH.java b/src/main/java/jcomicdownloader/module/ParseXXBH.java index 0b4de80..30735d9 100644 --- a/src/main/java/jcomicdownloader/module/ParseXXBH.java +++ b/src/main/java/jcomicdownloader/module/ParseXXBH.java @@ -118,8 +118,8 @@ public void parseComicURL() String jsURL2 = allPageString.substring( beginIndex, endIndex ); */ - // 取得v3_cont_v130404.js - beginIndex = allPageString.indexOf( "/cont_" ); + // 取得 http://cssen.177mh.com/img_v1/n17_co.js + beginIndex = allPageString.indexOf( "n17_co" ); beginIndex = allPageString.lastIndexOf( "http:", beginIndex ); endIndex = allPageString.indexOf( "\"", beginIndex ); String tempURL = allPageString.substring( beginIndex, endIndex ); @@ -160,7 +160,7 @@ public void parseComicURL() // 首先要下載js檔 beginIndex = allPageString.indexOf( "/coojs/" ); - beginIndex = allPageString.lastIndexOf( "\"", beginIndex ) + 1; + beginIndex = allPageString.lastIndexOf( "http:", beginIndex ); endIndex = allPageString.indexOf( "\"", beginIndex ); String jsURL = allPageString.substring( beginIndex, endIndex ); From 7f877e1b80f15aa9f96a63e5dc3ef606cfb9d3f4 Mon Sep 17 00:00:00 2001 From: surveyorK Date: Wed, 3 May 2017 06:59:01 +0800 Subject: [PATCH 2/3] fix e & ex --- src/main/java/jcomicdownloader/ComicDownGUI.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/jcomicdownloader/ComicDownGUI.java b/src/main/java/jcomicdownloader/ComicDownGUI.java index 2fcd83e..aa18a02 100644 --- a/src/main/java/jcomicdownloader/ComicDownGUI.java +++ b/src/main/java/jcomicdownloader/ComicDownGUI.java @@ -596,7 +596,11 @@ private static String getCompileDateString(){ return date; } - + private void initCookie() + { + java.net.CookieManager cm = new java.net.CookieManager(); + java.net.CookieHandler.setDefault(cm); + } public ComicDownGUI() { super(versionString); @@ -604,6 +608,8 @@ public ComicDownGUI() { minimizeEvent(); inittrayIcon(); + + initCookie(); mainFrame = (this); // for change look and feel From 999354a1f8d4c555fc4b31e802db48918993965b Mon Sep 17 00:00:00 2001 From: surveyorK Date: Wed, 3 May 2017 07:22:34 +0800 Subject: [PATCH 3/3] fix xxbh --- src/main/java/jcomicdownloader/module/ParseXXBH.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/jcomicdownloader/module/ParseXXBH.java b/src/main/java/jcomicdownloader/module/ParseXXBH.java index 30735d9..bd46916 100644 --- a/src/main/java/jcomicdownloader/module/ParseXXBH.java +++ b/src/main/java/jcomicdownloader/module/ParseXXBH.java @@ -117,9 +117,9 @@ public void parseComicURL() endIndex = allPageString.indexOf( "\"", beginIndex ); String jsURL2 = allPageString.substring( beginIndex, endIndex ); */ - - // 取得 http://cssen.177mh.com/img_v1/n17_co.js - beginIndex = allPageString.indexOf( "n17_co" ); + /* + // 取得v3_cont_v130404.js + beginIndex = allPageString.indexOf( "/cont_" ); beginIndex = allPageString.lastIndexOf( "http:", beginIndex ); endIndex = allPageString.indexOf( "\"", beginIndex ); String tempURL = allPageString.substring( beginIndex, endIndex ); @@ -134,6 +134,8 @@ public void parseComicURL() beginIndex = allJSPageString.lastIndexOf( "http:", beginIndex ); endIndex = allJSPageString.indexOf( "\"", beginIndex ); String jsURL2 = allJSPageString.substring( beginIndex, endIndex ); + */ + String jsURL2 = "http://css.177mh.com/img_v1/fdc_160903a.js"; Common.debugPrintln( "第2個js位址: " + jsURL2 ); @@ -160,7 +162,7 @@ public void parseComicURL() // 首先要下載js檔 beginIndex = allPageString.indexOf( "/coojs/" ); - beginIndex = allPageString.lastIndexOf( "http:", beginIndex ); + beginIndex = allPageString.lastIndexOf( "\"", beginIndex ) + 1; endIndex = allPageString.indexOf( "\"", beginIndex ); String jsURL = allPageString.substring( beginIndex, endIndex ); @@ -204,7 +206,7 @@ public void parseComicURL() for ( int p = 0; p < totalPage && Run.isAlive; p++ ) { - comicURL[p] = frontPicURLs[serverId - 1] + backPicURLs[p]; + comicURL[p] = frontPicURLs[serverId - 1] + backPicURLs[p].replace("\\", ""); //使用最簡下載協定,加入refer始可下載 referURL = webSite + "?page=" + (p + 1);