From 6169a244a9136aac6141edeca80e189314470c27 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 09:33:43 +0000 Subject: [PATCH 1/2] Initial plan From df7c54ab63ec123e8a41d629241147bdb3d81ed3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Feb 2026 09:35:44 +0000 Subject: [PATCH 2/2] Fix Stack Exchange API URL: use HTTPS and upgrade from v2.2 to v2.3 Co-authored-by: BolexLiu <11155268+BolexLiu@users.noreply.github.com> --- AutoEx-Lib/src/main/java/com/bolex/autoEx/API.java | 2 +- README.md | 4 ++++ buildSrc/src/main/java/com/mrd/exhibition/buildsrc/API.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AutoEx-Lib/src/main/java/com/bolex/autoEx/API.java b/AutoEx-Lib/src/main/java/com/bolex/autoEx/API.java index ba2ac98..c673b96 100644 --- a/AutoEx-Lib/src/main/java/com/bolex/autoEx/API.java +++ b/AutoEx-Lib/src/main/java/com/bolex/autoEx/API.java @@ -6,7 +6,7 @@ public class API { - public final static String SEARCH_URL ="http://api.stackexchange.com/2.2/search/advanced?site=stackoverflow&accepted=true"; + public final static String SEARCH_URL ="https://api.stackexchange.com/2.3/search/advanced?site=stackoverflow&accepted=true"; public final static String PAGESIZE ="&pagesize="; public final static String Body ="&body="; diff --git a/README.md b/README.md index 0e8f22f..464928d 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,10 @@ dependencies { - 基于搜索引擎扩展结果,避免精准匹配的异常有时候出不来的问题。要考虑墙的问题(google? bing?) +## 修复说明 + +- 将 Stack Overflow API 地址从 `http://api.stackexchange.com/2.2/` 升级为 `https://api.stackexchange.com/2.3/`,修复因 HTTP 协议和旧版 API 导致无法正常获取结果的问题。 + diff --git a/buildSrc/src/main/java/com/mrd/exhibition/buildsrc/API.java b/buildSrc/src/main/java/com/mrd/exhibition/buildsrc/API.java index 2e34bdd..e990d4a 100644 --- a/buildSrc/src/main/java/com/mrd/exhibition/buildsrc/API.java +++ b/buildSrc/src/main/java/com/mrd/exhibition/buildsrc/API.java @@ -6,7 +6,7 @@ public class API { - public final static String SEARCH_URL ="http://api.stackexchange.com/2.2/search/advanced?site=stackoverflow&accepted=true"; + public final static String SEARCH_URL ="https://api.stackexchange.com/2.3/search/advanced?site=stackoverflow&accepted=true"; public final static String PAGESIZE ="&pagesize="; public final static String Body ="&body=";