From b41a6efe17ba61d150c5a9b7309651cebae54e0d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 03 九月 2021 16:40:43 +0800 Subject: [PATCH] 韩迷TV相关bug修改,电视直播完善(后台+前端API) --- src/main/java/com/yeshi/buwan/util/video/AcfunApiUtil.java | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/util/video/AcfunApiUtil.java b/src/main/java/com/yeshi/buwan/util/video/AcfunApiUtil.java index 6f3d152..3b496d8 100644 --- a/src/main/java/com/yeshi/buwan/util/video/AcfunApiUtil.java +++ b/src/main/java/com/yeshi/buwan/util/video/AcfunApiUtil.java @@ -8,10 +8,8 @@ import java.util.Map; import com.google.gson.Gson; -import com.yeshi.buwan.acFun.AcfunVideoNew; -import com.yeshi.buwan.acFun.AcfunVideoResult; -import com.yeshi.buwan.service.imp.juhe.AcfunVideoNewService; -import com.yeshi.buwan.util.BeanUtil; +import com.yeshi.buwan.videos.acFun.AcfunVideoNew; +import com.yeshi.buwan.videos.acFun.AcfunVideoResult; import com.yeshi.buwan.util.HttpUtil; import com.yeshi.buwan.util.StringUtil; @@ -50,6 +48,7 @@ params.put("pcursor", pcursor); params.put("count", "100"); String result = baseRequest(url, params); + System.out.println(result); JSONObject resultJSON = JSONObject.fromObject(result); if (resultJSON.optInt("code") == 0) { JSONObject data = resultJSON.optJSONObject("data"); @@ -91,18 +90,20 @@ } public static void main(String[] args) { - AcfunVideoNewService acfunVideoNewService = BeanUtil.getBean(AcfunVideoNewService.class); - AcfunVideoResult result = videoList(""); - while (result != null && result.pcursor != null && !result.pcursor.equalsIgnoreCase("no_more")) { - if (result.videoList != null) - acfunVideoNewService.save(result.videoList); - result = videoList(result.pcursor); - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } +// AcfunVideoNewService acfunVideoNewService = BeanUtil.getBean(AcfunVideoNewService.class); +// AcfunVideoResult result = videoList(""); +// while (result != null && result.pcursor != null && !result.pcursor.equalsIgnoreCase("no_more")) { +// if (result.videoList != null) +// acfunVideoNewService.save(result.videoList); +// result = videoList(result.pcursor); +// try { +// Thread.sleep(2000); +// } catch (InterruptedException e) { +// e.printStackTrace(); +// } +// } + + videoList(""); // String[] sts = new String[] { "5xzzqkwh73r27gq", "5xzzknzyuvvd9vc" }; // List<Boolean> list = listValid(Arrays.asList(sts)); -- Gitblit v1.8.0