| | |
| | | |
| | | public class IqiYiNewAPI { |
| | | |
| | | public static int TYPE_DIANYING = 1; |
| | | public static int TYPE_DIANSHIJU = 2;//电视剧 |
| | | public static int TYPE_ZONGYI = 6;//综艺 |
| | | public static int TYPE_DONGMAN = 4;//动漫 |
| | | public final static int TYPE_DIANYING = 1; |
| | | public final static int TYPE_DIANSHIJU = 2;//电视剧 |
| | | public final static int TYPE_ZONGYI = 6;//综艺 |
| | | public final static int TYPE_DONGMAN = 4;//动漫 |
| | | |
| | | public static int TYPE_YULE = 7;//娱乐 |
| | | public static int TYPE_KEJI = 30;//科技 |
| | |
| | | return null; |
| | | } |
| | | |
| | | public static IqiyiAlbum2 getAlbumOrVideoDetail(Long id) { |
| | | List<Long> ids = new ArrayList<>(); |
| | | ids.add(id); |
| | | List<IqiyiAlbum2> list = getAlbumOrVideoDetail(ids); |
| | | |
| | | if (list != null && list.size() > 0) |
| | | return list.get(0); |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 获取更新的专辑 |
| | | * |
| | |
| | | } |
| | | |
| | | |
| | | public static String getIdByUrl(String url) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("playurl", url); |
| | | params.put("rec", "0"); |
| | | String result = baseRquest("http://expand.video.iqiyi.com/c/fb", params); |
| | | System.out.println(result); |
| | | if (!StringUtil.isNullOrEmpty(result)) { |
| | | JSONObject object = JSONObject.fromObject(result); |
| | | if (object != null) { |
| | | if ("A00000".equalsIgnoreCase(object.optString("code"))) {// 成功 |
| | | List<IqiyiAlbum2> albumList = new ArrayList<>(); |
| | | JSONObject obj = object.optJSONObject("data"); |
| | | return obj.optString("qipuId"); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static String getAidByUrl(String url) { |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("playurl", url); |
| | | params.put("rec", "0"); |
| | | String result = baseRquest("http://expand.video.iqiyi.com/c/fb", params); |
| | | System.out.println(result); |
| | | if (!StringUtil.isNullOrEmpty(result)) { |
| | | JSONObject object = JSONObject.fromObject(result); |
| | | if (object != null) { |
| | | if ("A00000".equalsIgnoreCase(object.optString("code"))) {// 成功 |
| | | List<IqiyiAlbum2> albumList = new ArrayList<>(); |
| | | JSONObject obj = object.optJSONObject("data"); |
| | | return obj.optString("albumQipuId"); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | private static Gson gson = null; |
| | | |
| | | static class DoubleTypeAdapter implements JsonDeserializer<Double> { |