涩图模块:空格替换成|以便支持多关键词搜索

This commit is contained in:
Yutousama 2022-04-20 20:12:59 +08:00
parent 731d7734d5
commit 149e64d85f

View File

@ -69,6 +69,7 @@ public class GetSeTu extends Model {
url = "https://api.lolicon.app/setu/v2?r18=1&size=regular"; url = "https://api.lolicon.app/setu/v2?r18=1&size=regular";
} }
if (!StringUtils.isEmpty(key)) { if (!StringUtils.isEmpty(key)) {
key=key.replace(" ","|");
if (r18) { if (r18) {
url = "https://api.lolicon.app/setu/v2?" + model + "=" + URLEncoder.encode(key, StandardCharsets.UTF_8) + "&r18=1&size=regular"; url = "https://api.lolicon.app/setu/v2?" + model + "=" + URLEncoder.encode(key, StandardCharsets.UTF_8) + "&r18=1&size=regular";
} else { } else {