diff --git a/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java b/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java index 6d11c12..25b4b13 100644 --- a/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java +++ b/src/main/java/net/lamgc/cgj/bot/BotCommandProcess.java @@ -316,7 +316,7 @@ public class BotCommandProcess { ) throws IOException, InterruptedException { log.debug("正在执行搜索..."); JsonObject resultBody = CacheStoreCentral.getCentral() - .getSearchBody(content, type, area, includeKeywords, excludeKeywords, contentOption); + .getSearchBody(content, type, area, includeKeywords, excludeKeywords, contentOption, pagesIndex); StringBuilder result = new StringBuilder("内容 " + content + " 的搜索结果:\n"); log.debug("正在处理信息..."); diff --git a/src/main/java/net/lamgc/cgj/bot/cache/CacheStoreCentral.java b/src/main/java/net/lamgc/cgj/bot/cache/CacheStoreCentral.java index 5c4aa4d..a6bbe93 100644 --- a/src/main/java/net/lamgc/cgj/bot/cache/CacheStoreCentral.java +++ b/src/main/java/net/lamgc/cgj/bot/cache/CacheStoreCentral.java @@ -423,7 +423,9 @@ public final class CacheStoreCentral { String area, String includeKeywords, String excludeKeywords, - String contentOption) throws IOException { + String contentOption, + int pageIndex + ) throws IOException { PixivSearchLinkBuilder searchBuilder = new PixivSearchLinkBuilder(Strings.isNullOrEmpty(content) ? "" : content); if (type != null) { try { @@ -463,6 +465,10 @@ public final class CacheStoreCentral { } } + if(pageIndex > 0) { + searchBuilder.setPage(pageIndex); + } + log.debug("正在搜索作品, 条件: {}", searchBuilder.getSearchCondition()); Locker locker