新增涩图
This commit is contained in:
parent
5b928afa82
commit
1bf0336b72
@ -26,9 +26,8 @@ public class GetSeTu extends Model {
|
|||||||
super.onMessage(qq, event, isGroup);
|
super.onMessage(qq, event, isGroup);
|
||||||
if ("来点色图".equals(msg)||"来点涩图".equals(msg)){
|
if ("来点色图".equals(msg)||"来点涩图".equals(msg)){
|
||||||
String ret=HttpTools.get("https://api.ixiaowai.cn/api/api.php?return=json");
|
String ret=HttpTools.get("https://api.ixiaowai.cn/api/api.php?return=json");
|
||||||
System.out.println("ret = " + ret);
|
|
||||||
JSONObject json=JSONObject.parseObject(ret);
|
JSONObject json=JSONObject.parseObject(ret);
|
||||||
HttpTools.download(json.getString("acgurl"),
|
HttpTools.download(json.getString("imgurl"),
|
||||||
null, new DownloadInterface() {
|
null, new DownloadInterface() {
|
||||||
@Override
|
@Override
|
||||||
public void onDownload(File file) {
|
public void onDownload(File file) {
|
||||||
@ -40,18 +39,4 @@ public class GetSeTu extends Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
HttpTools.download("https://api.ixiaowai.cn/api/api.php", null, new DownloadInterface() {
|
|
||||||
@Override
|
|
||||||
public void onDownload(File file) {
|
|
||||||
super.onDownload(file);
|
|
||||||
System.out.println(file.getAbsoluteFile());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user