| | |
| | | |
| | | // 电视剧解析 |
| | | public static List<FunTVTVAlbum> parseTVListAlbum(String protocolXML) { |
| | | List<FunTVTVAlbum> videoList = new ArrayList<FunTVTVAlbum>(); |
| | | List<FunTVTVAlbum> videoList = new ArrayList<>(); |
| | | try { |
| | | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); |
| | | DocumentBuilder builder = factory.newDocumentBuilder(); |
| | |
| | | |
| | | // 综艺解析 |
| | | public static List<FunTVShowAlbum> parseShowListVideo(String protocolXML) { |
| | | List<FunTVShowAlbum> videoList = new ArrayList<FunTVShowAlbum>(); |
| | | List<FunTVShowAlbum> videoList = new ArrayList<>(); |
| | | try { |
| | | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); |
| | | DocumentBuilder builder = factory.newDocumentBuilder(); |
| | |
| | | |
| | | // 小视频解析 |
| | | public static List<FunTVShortVideo> parseShortListVideo(String protocolXML) { |
| | | List<FunTVShortVideo> videoList = new ArrayList<FunTVShortVideo>(); |
| | | List<FunTVShortVideo> videoList = new ArrayList<>(); |
| | | try { |
| | | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); |
| | | DocumentBuilder builder = factory.newDocumentBuilder(); |
| | |
| | | } else if ("details".equalsIgnoreCase(contents.item(j).getNodeName())) { |
| | | // 详情 |
| | | NodeList videos = contents.item(j).getChildNodes(); |
| | | List<FunTVTVVideo> videoList = new ArrayList<FunTVTVVideo>(); |
| | | List<FunTVTVVideo> videoList = new ArrayList<>(); |
| | | for (int n = 0; n < videos.getLength(); n++) { |
| | | if (videos.item(n).getNodeName().equalsIgnoreCase("detail")) { |
| | | NodeList videoDetails = videos.item(n).getChildNodes(); |
| | |
| | | } else if ("details".equalsIgnoreCase(contents.item(j).getNodeName())) { |
| | | // 详情 |
| | | NodeList videos = contents.item(j).getChildNodes(); |
| | | List<FunTVCartoonVideo> videoList = new ArrayList<FunTVCartoonVideo>(); |
| | | List<FunTVCartoonVideo> videoList = new ArrayList<>(); |
| | | for (int n = 0; n < videos.getLength(); n++) { |
| | | if (videos.item(n).getNodeName().equalsIgnoreCase("detail")) { |
| | | NodeList videoDetails = videos.item(n).getChildNodes(); |
| | |
| | | } else if ("shows".equalsIgnoreCase(contents.item(j).getNodeName())) { |
| | | // 详情 |
| | | NodeList videos = contents.item(j).getChildNodes(); |
| | | List<FunTVShowVideo> videoList = new ArrayList<FunTVShowVideo>(); |
| | | List<FunTVShowVideo> videoList = new ArrayList<>(); |
| | | for (int n = 0; n < videos.getLength(); n++) { |
| | | if (videos.item(n).getNodeName().equalsIgnoreCase("show")) { |
| | | NodeList videoDetails = videos.item(n).getChildNodes(); |