From 39e9b7858136b795391e43b1befac681915a51e1 Mon Sep 17 00:00:00 2001 From: yutou Date: Fri, 30 Apr 2021 17:49:25 +0800 Subject: [PATCH] update --- .../java/com/yutou/bilibili/BiliBili/LiveUtils.java | 12 +++--------- .../com/yutou/bilibili/BiliBili/Tools/SaveLive.java | 1 + .../java/com/yutou/bilibili/QQBot/QQBotManager.java | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java b/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java index 6ee39f4..c613406 100644 --- a/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java +++ b/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java @@ -180,14 +180,7 @@ public class LiveUtils { public synchronized static JSONObject http_get(String url) { try { - if (System.currentTimeMillis() - oldBiliBiliHttpTime < 1000) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - com.yutou.bilibili.Tools.Log.e(e); - } - oldBiliBiliHttpTime = System.currentTimeMillis(); - } + Log.i("调用url = "+url); HttpURLConnection connection = getBiliHttpGet(url, getCookie()); BufferedInputStream stream = new BufferedInputStream(connection.getInputStream()); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); @@ -448,11 +441,12 @@ public class LiveUtils { infoMap.put(upInfo.getRoomid(), json); } try { - Thread.sleep(300); + Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } + Log.i("信息map数量:"+infoMap.size()); } public synchronized void check(int roomId) { diff --git a/src/main/java/com/yutou/bilibili/BiliBili/Tools/SaveLive.java b/src/main/java/com/yutou/bilibili/BiliBili/Tools/SaveLive.java index 0c92963..64e324e 100644 --- a/src/main/java/com/yutou/bilibili/BiliBili/Tools/SaveLive.java +++ b/src/main/java/com/yutou/bilibili/BiliBili/Tools/SaveLive.java @@ -6,6 +6,7 @@ import com.yutou.bilibili.BiliBili.Live; import com.yutou.bilibili.BiliBili.LiveUtils; import com.yutou.bilibili.QQBot.QQBotManager; import com.yutou.bilibili.Tools.AppTools; +import com.yutou.bilibili.Tools.FFmpegUtils; import com.yutou.bilibili.Tools.HttpTools; import com.yutou.bilibili.Tools.Log; diff --git a/src/main/java/com/yutou/bilibili/QQBot/QQBotManager.java b/src/main/java/com/yutou/bilibili/QQBot/QQBotManager.java index 82faf19..f77b6ca 100644 --- a/src/main/java/com/yutou/bilibili/QQBot/QQBotManager.java +++ b/src/main/java/com/yutou/bilibili/QQBot/QQBotManager.java @@ -358,7 +358,7 @@ public class QQBotManager implements ApplicationContextAware { e.printStackTrace(); } }else { - System.out.println("未知指令:"+msg); + Log.i("未知指令:"+msg); } } }