public String getMainUrlFromSingleVolumeUrl(String volumeURL) {
    // ex. http://manhua.manmankan.com/html/1916/42388.asp轉為
    //     http://www.manmankan.com/html/1916/index.asp

    int endIndex = Common.getIndexOfOrderKeyword(volumeURL, "/", 5) + 1;
    String mainURL = volumeURL.substring(0, endIndex) + "index.asp";

    return mainURL.replaceAll("manhua.manmankan.com", "www.manmankan.com");
  }
Пример #2
0
  @Override
  public String getTitleOnSingleVolumePage(String urlString) {
    String allPageString = getAllPageString(urlString);
    int beginIndex = Common.getIndexOfOrderKeyword(allPageString, ">>", 3) + 2;
    int endIndex = Common.getSmallerIndexOfTwoKeyword(allPageString, beginIndex, "[", ">>");
    String title = allPageString.substring(beginIndex, endIndex).trim();

    return Common.getStringRemovedIllegalChar(Common.getTraditionalChinese(title));
  }
Пример #3
0
  @Override
  public void setParameters() {
    Common.debugPrintln("開始解析各參數 :");

    Common.debugPrintln("開始解析title和wholeTitle :");

    if (getWholeTitle() == null || getWholeTitle().equals("")) {
      String allPageString = getAllPageString(webSite);
      int beginIndex = Common.getIndexOfOrderKeyword(allPageString, ">>", 4) + 2;
      int endIndex = allPageString.indexOf("<", beginIndex);
      String title = allPageString.substring(beginIndex, endIndex).trim();

      setWholeTitle(Common.getStringRemovedIllegalChar(Common.getTraditionalChinese(title)));
    }

    Common.debugPrintln("作品名稱(title) : " + getTitle());
    Common.debugPrintln("章節名稱(wholeTitle) : " + getWholeTitle());
  }