换个二次元图源API试试

This commit is contained in:
2022-04-17 00:58:34 +08:00
parent a83e92b947
commit 2da36d7918
2 changed files with 4 additions and 4 deletions

View File

@@ -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);