Skip to content

Commit 5c271f9

Browse files
committed
♻️ 重构 HibiAPI 配置方式
- 在 bika.yaml 和 pixiv.yaml 中将 hibiAPI 地址默认值改为为空字符串 - 在 Bika.js 和 hibiApi.js 中添加默认 HibiAPI 地址作为备选 - 优化配置文件结构,提高可读性和易用性
1 parent d16c4d9 commit 5c271f9

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

config/default_config/bika.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ bikaDirectConnection: false
88
bikaImageProxy: s3.go2778.com/static
99
# 哔咔图片质量,可选值 ['low', 'medium', 'high', 'original'] 质量依次从低到高
1010
imageQuality: medium
11-
# 使用的hibiapi地址 https://github.com/mixmoe/HibiAPI
11+
# 使用的hibiapi地址 不填使用内置
12+
# https://github.com/mixmoe/HibiAPI
1213
# 默认:https://hibi.Yunzai-Bot.com
1314
# 抱脸:https://dengfenglai-hibiapi.hf.space
1415
# cloudflare:https://hibiapi.dengfenglai.workers.dev
15-
hibiAPI: https://hibi.Yunzai-Bot.com
16+
hibiAPI: ""
1617
# 哔咔搜索排序方式:dd(最新发布)、da(最早发布)、ld(最多喜欢)、vd(最多浏览)
1718
searchSort: ld
1819
# 隐藏哔咔搜索简略图

config/default_config/pixiv.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ pixivImageProxy: i.pixiv.re
77
# 每名用户每日次数限制(0 则无限制)
88
limit: 30
99

10-
# 使用的hibiapi地址 https://github.com/mixmoe/HibiAPI
10+
# 使用的hibiapi地址 不填使用内置
11+
# https://github.com/mixmoe/HibiAPI
1112
# 默认:https://hibi.Yunzai-Bot.com
1213
# 备1:https://dengfenglai-hibiapi.hf.space
1314
# 备2:https://hibiapi.dengfenglai.workers.dev
14-
hibiAPI: https://hibi.Yunzai-Bot.com
15+
hibiAPI: ""
1516

1617
# Pixiv 登录凭证刷新令牌 (Refresh Token)
1718
# 获取方法请参考: https://github.com/mixmoe/HibiAPI/issues/53

model/Bika.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Config } from "../components/index.js"
44

55
export default new (class {
66
constructor() {
7-
this.domain = `${Config.bika.hibiAPI}/api/bika`
7+
this.domain = `${Config.bika.hibiAPI ?? "https://hibi.Yunzai-Bot.com"}/api/bika`
88
this.hearder = {
99
headers: {
1010
"x-image-quality": Config.bika.imageQuality

model/Pixiv/hibiApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import request from "#yenai.request"
33

44
export default new class HibiAPI {
55
constructor() {
6-
this.domain = `${Config.pixiv.hibiAPI}/api/pixiv`
6+
this.domain = `${Config.pixiv.hibiAPI ?? "https://hibi.Yunzai-Bot.com"}/api/pixiv`
77
}
88

99
async illust(params) {

0 commit comments

Comments
 (0)