Package com.skyline.wo.model

Examples of com.skyline.wo.model.Video


   * @param url
   * @return
   * @throws Exception
   */
  public static Video getVideoInfo(String url) throws Exception {
    Video video = null;

    if (url.indexOf(VideoConstants.VIDEO_DOMAIN_YOUKU) != -1) {
      try {
        video = getYouKuVideo(url);
      } catch (Exception e) {
        e.printStackTrace();
        video = null;
      }
    }
    else if(url.indexOf(VideoConstants.VIDEO_DOMAIN_TUDOU_PLAYLIST)!=-1){
      try {
        video = getTudouPlayListVideo(url);
      } catch (Exception e) {
        video = null;
      }
    }else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_TUDOU) != -1) {
      try {
        video = getTudouVideo(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_KU6) != -1) {
      try {
        video = getKu6Video(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_CN6) != -1) {
      try {
        video = get6Video(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_WOLE) != -1) {
      try {
        video = get56Video(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_SINA) != -1) {
      try {
        video = getSinaVideo(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_SOHU) != -1) {
      try {
        video = getSohuVideo(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_IFENG) != -1) {
      try {
        video = getIfengVideo(url);
      } catch (Exception e) {
        video = null;
      }
    } else if (url.indexOf(VideoConstants.VIDEO_DOMAIN_YINYUETAI) != -1) {
      try {
        video = getYinYueTaiVideo(url);
      } catch (Exception e) {
        video = null;
      }
    } else {
      // 链接地址不在支持的列表中时返回原链接地址以及链接的页面标题
      Document doc = getURLContent(url);
      video = new Video();
      video.setTitle(doc.title());
      video.setPageUrl(url);
    }

    return video;
  }
View Full Code Here


      Element el = doc.getElementById("long");
      summary = el.select(".item").get(0).html();
    } catch (Exception e) {
    }

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setTime(time);
    video.setSource("优酷视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(htmlCode);

    return video;
  }
View Full Code Here

    try {
      time = content.split("time:\"")[1].split("\"")[0].trim();
    } catch (Exception e) {
    }

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setTime(time);
    video.setSource("土豆视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));

    return video;
  }
View Full Code Here

    try {
      time = getScriptVarByName("time", content);
    } catch (Exception e) {
    }

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setTime(time);
    video.setSource("土豆视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));

    return video;
  }
View Full Code Here

    /**
     * 视频简介
     */
    String summary = doc.select("meta[name=Description]").attr("content");

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setTime(time);
    video.setSource("酷6视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(htmlCode);
    return video;

  }
View Full Code Here

     */
    Element flashEt = doc.getElementById("video-share-code");
    doc = Jsoup.parse(flashEt.attr("value"));
    String flash = doc.select("embed").attr("src");

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setSource("6间房");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));

    return video;
  }
View Full Code Here

    /**
     * 视频简介
     */
    String summary = doc.select("meta[name=Description]").attr("content");

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setSource("56视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));
    return video;
  }
View Full Code Here

    /**
     * flash地址
     */
    String flash = getScriptVarByName("swfOutsideUrl", content);

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(pic);
    video.setFlashUrl(flash);
    video.setSource("新浪视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));
    return video;
  }
View Full Code Here

    /**
     * 视频FLASH地址
     */
    String flash = "http://share.vrs.sohu.com/" + videoId + "/v.swf&autoplay=false";

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(thumbnail);
    video.setFlashUrl(flash);
    video.setSource("搜狐视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));
    return video;
  }
View Full Code Here

    long ss = Long.parseLong(time);
    long hour = ss / 3600;
    long minute = ss % 3600 / 60;
    long second = ss % 60;

    Video video = new Video();
    video.setTitle(title);
    video.setThumbnail(thumbnail);
    video.setFlashUrl(flash);
    video.setTime(hour + ":" + minute + ":" + second);
    video.setSource("凤凰视频");
    video.setPageUrl(url);
    video.setSummary(summary);
    video.setHtmlCode(getHtmlCode(flash));
    return video;
  }
View Full Code Here

TOP

Related Classes of com.skyline.wo.model.Video

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.