聚合云播

排序

山形尖叫剧情简介

  * @param url * 资源地址 * @return * 返回子页列表 */public ArrayList crawlDetail(String url) throws IOException { // TODO return null;} /** * 获取视频详情页信息 * @param url 详情页url * @return */ public Video getVideoDetail(String url) { try { Cdoc doc = download(url); Video video = new Video(); String title = doc.text("div.mod_M h1.mall_txt"); if(title.contains("【")) title = doc.text(".mod_menu .l_f"); String director = doc.text(".jianju a"); if(director.contains("...")) director = null; String release = doc.text("li:contains(上映时间)"); if(!release.contains(" "))release = null; String verse = doc.text("li:contains(又名)"); if(verse.contains("暂无"))verse = null; String[] tags = doc.text(".mod_k a").split(":"); // 优化后的文本 title = FilterUtil.replace(title).replaceAll(" ", ""); director = FilterUtil.replace(director).replaceAll(" ", ""); release = FilterUtil.replace(release).replaceAll(" ", ""); verse = FilterUtil.replace(verse).replaceAll(" ", ""); // 封装 video.setDirector(director); video.setRelease(release); video.setTitle(title); video.setVerse(verse); List list = new ArrayList(); for(String tag : tags){ list.add(tag); } video.setTags(list); return video; } catch (Exception e) { e.printStackTrace(); } return null; } /** * 解析视频列表 * @param url * @return */ public ArrayList