♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
GarfieldandCopilot committed 2026-11-16 14:07:45 +08:00
1 parent 6379a117c2
commit 0174664163
15 files changed
+47 -47

No files matched your search

+4 -4
View File
@@ -83,7 +83,7 @@ local folded = Mapper.chapters({ is_fold = true, section = { title = "红包不
Assert.eq(folded[1].vip, true)
local detail = Mapper.detail(simple, "1580618311758471168/1598363011911184384")
Assert.eq(detail.cover, "https://img/c.jpg")
Assert.eq(detail.source_id, "ext.zhihu")
Assert.eq(detail.source_id, "zhihu")
local requests = {}
local request_options = {}
@@ -143,7 +143,7 @@ Assert.eq(request_options[#request_options].headers["x-zse-93"], "101_3_3.1")
Assert.matches(request_options[#request_options].headers["x-zse-96"], "^2%.0_.+")
local Settings = require("utils.settings")
local cfg = Settings.getSource("ext.zhihu")
local cfg = Settings.getSource("zhihu")
cfg.cookie = "z_c0=saved"
local verified, verify_error
Client.loginCheckAsync("z_c0=candidate", function(ok, err) verified, verify_error = ok, err end)
@@ -174,8 +174,8 @@ local Auth = require("source.auth")
Auth.reset()
response_code = 401
Client.searchAsync("红包", function(_books, err) verify_error = err end)
Assert.is_true(Auth.expired("ext.zhihu"))
Assert.is_true(Auth.expired("zhihu"))
Assert.eq(verify_error, "知乎登录已失效,请重新登录")
cfg.cookie = nil
Settings.saveSource("ext.zhihu")
Settings.saveSource("zhihu")
Auth.reset()