From d4e1499aaa0e539407b0978e45ffcc59af033911 Mon Sep 17 00:00:00 2001 From: surveyorK Date: Thu, 16 Nov 2017 07:39:34 +0800 Subject: [PATCH] fix XXBH --- .../jcomicdownloader/module/ParseXXBH.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/main/java/jcomicdownloader/module/ParseXXBH.java b/src/main/java/jcomicdownloader/module/ParseXXBH.java index bf444b4..ce63cdd 100644 --- a/src/main/java/jcomicdownloader/module/ParseXXBH.java +++ b/src/main/java/jcomicdownloader/module/ParseXXBH.java @@ -135,6 +135,8 @@ public void parseComicURL() 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,8 +162,9 @@ public void parseComicURL() //Common.debugPrint( "開始解析這一集有幾頁 : " ); - // 首先要下載js檔 - beginIndex = allPageString.indexOf( "/coojs/" ); + + // 首先要下載js檔 + beginIndex = allPageString.indexOf( "https://a70.readingbox.net/telc" ); beginIndex = allPageString.lastIndexOf( "\"", beginIndex ) + 1; endIndex = allPageString.indexOf( "\"", beginIndex ); Common.debugPrintln("->" + beginIndex + "," + endIndex); @@ -211,7 +214,7 @@ public void parseComicURL() serverId = Integer.parseInt( tempString.trim() ); serverPicURLs[0] = frontPicURLs[serverId - 1]; - Common.debugPrintln("第一組可能伺服器位址:" + serverPicURLs[0]); + Common.debugPrintln("第四組可能伺服器位址:" + serverPicURLs[4]); } //else // 圖片伺服器不在清單裡面,需另外請求 { @@ -223,7 +226,11 @@ public void parseComicURL() endIndex = webSite.indexOf(".html"); String coid = webSite.substring(beginIndex, endIndex); - String requestURL = "http://css.177mh.com/img_v1/cn_svr.aspx?s=9&cid=" + cid + "&coid=" + coid; + String requestBaseURL; + //requestBaseURL = "http://css.177mh.com/img_v1/cn_svr.aspx?s=9&cid="; + requestBaseURL = "https://a70.readingbox.net/img_v1/hw2_svr.aspx?s=44&cid="; + + String requestURL = requestBaseURL + cid + "&coid=" + coid; String tempAllString = getAllPageString( requestURL ); @@ -231,20 +238,20 @@ public void parseComicURL() endIndex = tempAllString.indexOf("\"", beginIndex); serverPicURLs[1] = tempAllString.substring(beginIndex, endIndex); - Common.debugPrintln("第二組可能伺服器位址:" + serverPicURLs[1]); + Common.debugPrintln("第一組可能伺服器位址:" + serverPicURLs[0]); } - serverPicURLs[2] = "http://hw2.readingbox.net/h" + serverId + "/"; - serverPicURLs[3] = "http://h59.readingbox.net/h" + serverId + "/"; - serverPicURLs[4] = "http://hf2.readingbox.net/h" + serverId + "/"; + serverPicURLs[1] = "http://hw2.readingbox.net/h" + serverId + "/"; + serverPicURLs[2] = "http://h59.readingbox.net/h" + serverId + "/"; + serverPicURLs[3] = "http://hf2.readingbox.net/h" + serverId + "/"; for (int i = 0; i < serverPicURLs.length; i++) { - if (Common.urlIsOK(serverPicURLs[i] + backPicURLs[0])) + if (serverPicURLs[i] != null && Common.urlIsOK(serverPicURLs[i] + backPicURLs[0])) { serverPicURL = serverPicURLs[i]; break; - } + } } Common.debugPrintln( "第一張圖片位址:" + serverPicURL + backPicURLs[0] );