@@ -0,0 +1,1571 @@
+package page;%0A%0Aimport net.HttpPage;%0A%0Apublic class VideoPage %7B%0A%09public static String VIDEO_SAVE_PATH = %22%22;%0A%09%0A%09private final String CODE_MODE = %22utf8%22;%0A%09private final String url_str_pre = %22http://player.glair.yahooapis.jp/GlairWebService/V1/video?vid=%22;%0A%09%0A%09public String getVideoUrl(String videoId)%7B%0A%09%09HttpPage.CODE_MODE = CODE_MODE;%0A%09%09String content = HttpPage.getPageSource(url_str_pre + videoId);%0A//%09%09System.out.println(content);%0A%09%09%0A%09%09String videoUrl = getBestVideoUrl(content);%0A%09%09System.out.println(videoUrl);%0A%09%09%0A%09%09return videoUrl;%0A//%09%09Writer.write(HttpPage.getPageRawSource(videoUrl),VIDEO_SAVE_PATH); %0A%09%7D%0A%0A%09private String getBestVideoUrl(String content) %7B%0A%09%09String bestVideoUrl = %22%22;%0A%09%09%0A%09%09String urlStartString = %22%3CFileURL%3E%22;%0A%09%09String urlEndString = %22%3C%22;%0A%09%09String rateStartString = %22%3CBitrate%3E%22;%0A%09%09String rateEndString = %22%3C%22;%0A%09%09%0A%09%09int urlStartIndex,urlEndIndex,rateStartIndex,rateEndIndex = 0;%0A%09%09int maxRate = 0 , rate;%0A%09%09while(true)%7B%0A%09%09%09urlStartIndex = content.indexOf(urlStartString, rateEndIndex);%0A%09%09%09if(-1 == urlStartIndex)break;%0A%09%09%09%0A%09%09%09urlStartIndex += urlStartString.length();%0A%09%09%09urlEndIndex = content.indexOf(urlEndString, urlStartIndex);%0A%09%09%09%0A%09%09%09rateStartIndex = content.indexOf(rateStartString, urlEndIndex) + rateStartString.length();%0A%09%09%09rateEndIndex = content.indexOf(rateEndString, rateStartIndex);%0A%09%09%09%0A%09%09%09rate = Integer.parseInt(content.substring(rateStartIndex, rateEndIndex));%0A//%09%09%09System.out.println(rate);%0A%09%09%09if(rate %3E maxRate)%7B%0A%09%09%09%09bestVideoUrl = content.substring(urlStartIndex, urlEndIndex);%0A%09%09%09%09maxRate = rate;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return bestVideoUrl;%0A%09%7D%0A%7D%0A

Create VideoPage.java