*
* @param url
* 视频URL
*/
public static Video getTudouPlayListVideo(String url) throws Exception {
Document doc = getURLContent(url);
String content = doc.html();
int beginLocal = content.indexOf("<script>var");
int endLocal = content.indexOf("</script>");
content = content.substring(beginLocal, endLocal);
String[] playListInfo=url.split("playlist")[1].split("i");
String id="";
if(playListInfo.length==1){
//URL中不带有播放的文件id
id = getScriptVarByName("defaultIid", content).trim();
content=content.split(id)[3];
//System.out.println(id);
}else{
//URL带有播放的文件id
id = playListInfo[1].split("\\.")[0];
content=content.split(id)[1];
//System.out.println(id);
}
/**
* 视频标题
*/
String title = "";
try {
//title:"
title = content.split("title:\"")[1].split("\"")[0].trim();
} catch (Exception e) {
}
/**
* 获取视频地址
*/
String flash = "";
flash = content.split("icode:\"")[1].split("\"")[0];
flash = "http://www.tudou.com/v/" + flash.trim() + "/v.swf";
/**
* 获取视频缩略图
*/
String pic = "";
pic = content.split("pic:\"")[1].split("\"")[0].trim();
//pic = pic.trim();
/**
* 视频简介
*/
String summary = "";
try {
summary = doc.select("meta[name=Description]").attr("content");
} catch (Exception e) {
}
/**
* 获取视频时间
*/