From 15b0e14eddcf293573e7a4c70c3fd3a48ca85d39 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Wed, 20 Apr 2022 20:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=A9=E5=9B=BE=E6=A8=A1=E5=9D=97=EF=BC=9A?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E5=85=B3=E9=94=AE=E8=AF=8D=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 a2cee0d..e9d3966 100644 --- a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java +++ b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java @@ -73,10 +73,12 @@ public class GetSeTu extends Model { String[] keys = key.split(" "); StringBuilder keyBuilder = new StringBuilder(); for (String _key : keys) { - keyBuilder.append(_key).append("&tag="); + keyBuilder.append(URLEncoder.encode(_key,StandardCharsets.UTF_8)).append("&tag="); } key = keyBuilder.toString(); key = key.substring(0, key.length() - 5); + }else{ + key=URLEncoder.encode(key,StandardCharsets.UTF_8); } if (r18) { url = "https://api.lolicon.app/setu/v2?" + model + "=" + key + "&r18=1&size=regular";