From 808798028f58565937f696764860fe9e22d135cc Mon Sep 17 00:00:00 2001 From: yutou <583819556@qq.com> Date: Tue, 20 Jun 2023 17:48:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=91=B8=E9=B1=BC=E6=97=A5?= =?UTF-8?q?=E5=8E=86API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/qqbot/models/Commands/Moyu.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yutou/qqbot/models/Commands/Moyu.java b/src/main/java/com/yutou/qqbot/models/Commands/Moyu.java index e936f1c..ca65cb1 100644 --- a/src/main/java/com/yutou/qqbot/models/Commands/Moyu.java +++ b/src/main/java/com/yutou/qqbot/models/Commands/Moyu.java @@ -51,9 +51,9 @@ public class Moyu extends Model { private void downloadImage(boolean isSend, Long qq) { Log.i(this, "下载图片"); - String ret = HttpTools.get("https://api.j4u.ink/v1/store/other/proxy/remote/moyu.json"); + String ret = HttpTools.get("https://api.vvhan.com/api/moyu?type=json"); JSONObject json = JSON.parseObject(ret); - HttpTools.download(json.getJSONObject("data").getString("moyu_url"), AppTools.getToDayTime() + "_moyu.jpg", new DownloadInterface() { + HttpTools.download(json.getString("url"), AppTools.getToDayTime() + "_moyu.jpg", new DownloadInterface() { int count = 3; @Override @@ -86,4 +86,8 @@ public class Moyu extends Model { downloadImage(true, qq); } } + + public static void main(String[] args) { + + } }