@@ -0,0 +1,1415 @@
+package page;%0A%0Aimport java.util.List;%0A%0Aimport file.Writer;%0A%0Aimport net.HttpPage;%0A%0Aimport reg.Reg;%0A%0Apublic class NewsPage %7B%0A%09public static String TEXT_SAVE_PATH = %22%22;%0A%09%0A%09private final String VIDEO_REG_STR = %22data-vid=%5C%22%5B%5E%5C%22%5D+%22;%0A%09private final String CODE_MODE = %22euc-jp%22;%0A%09private String url_str;%0A%09%0A%09private String page_content;%0A%09%0A%09public void setUrl(String url)%7B%0A%09%09url_str = url;%0A%09%7D%0A%09%0A%09/*%0A%09 * save text%0A%09 */%0A%09private void loadText()%7B%0A%09%09HttpPage.CODE_MODE = CODE_MODE;%0A%09%09page_content = HttpPage.getPageSource(url_str);%0A%09%09%0A%09%09//get text%0A%09%09String startString = %22yjS ymuiDate%5C%22%3E%22;%0A%09%09String endString   = %22%3C/div%3E%22;%0A%09%09int startIndex = page_content.indexOf(startString) + startString.length();%0A%09%09int endIndex = page_content.indexOf(endString,startIndex);%0A%09%09String text = page_content.substring(startIndex,endIndex);%0A%09%09%0A%09%09//replace %3C/p%3E%0A%09%09text = text.replace(%22%3C/p%3E%22, %22%5BENTER%5D%22);%0A%09%09%0A%09%09//replace %3Cbr%3E%0A%09%09text = text.replaceAll(%22%3Cbr%5C%5Cs*%5B/%5D?%5C%5Cs*%3E%22, %22%5BENTER%5D%22);%0A%09%09%0A%09%09//remove &1234;%0A%09%09text = text.replaceAll(%22&.%7B4%7D;%22,%22%22);%0A%09%09%0A%09%09//remove %3C*%3E%0A%09%09text = text.replaceAll(%22%3C%5B%5E%3E%5D+%3E%22, %22%22);%0A%09%09%0A%09%09//remove enter key%0A%09%09text = text.replace(%22%5Cn%22,%22%22);%0A%09%09%0A%09%09System.out.println(text);%0A%09%09%0A%09%09Writer.write(text.getBytes(), TEXT_SAVE_PATH);%0A%09%7D%0A%09%0A%09public String getVideoId()%7B%0A%09%09loadText();%0A%09%09%0A%09%09String videoId = %22%22;%0A%09%09List%3CString%3E matchList = Reg.matches(VIDEO_REG_STR, page_content);%0A%09%09videoId = matchList.get(0).substring(10);%0A%09%09return videoId;%0A%09%7D%0A%7D%0A

Create NewsPage.java