diff --git a/src/main/java/com/yutou/qqbot/QQBotApplication.java b/src/main/java/com/yutou/qqbot/QQBotApplication.java index 2bc2c99..bb0c689 100644 --- a/src/main/java/com/yutou/qqbot/QQBotApplication.java +++ b/src/main/java/com/yutou/qqbot/QQBotApplication.java @@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class QQBotApplication { - public static final String version="QQBot v.1.2.15"; + public static final String version="QQBot v.1.2.16"; public static void main(String[] args) { System.out.println("version = " + version); SpringApplication.run(QQBotApplication.class, args); diff --git a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java index ce744e0..9e5dee3 100644 --- a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java +++ b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java @@ -30,10 +30,10 @@ public class GetSeTu extends Model { public void onMessage(Long qq, MessageEvent event, boolean isGroup) { super.onMessage(qq, event, isGroup); if ("来点色图".equals(msg) || "来点涩图".equals(msg)) { - String ret = HttpTools.get("https://www.dmoe.cc/random.php?return=json"); + String ret = HttpTools.get("https://api.lolicon.app/setu/v2?r18=2"); JSONObject json = JSONObject.parseObject(ret); - HttpTools.download(json.getString("imgurl"), - "setu.jpg", new DownloadInterface() { + HttpTools.download(json.getJSONArray("data").getJSONObject(0).getJSONObject("urls").getString("original"), + System.currentTimeMillis()+"_setu.jpg", new DownloadInterface() { @Override public void onDownload(File file) { super.onDownload(file);