♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
6379a117c2
commit
0174664163
15 files changed
+47
-47
No files matched your search
@@ -43,7 +43,7 @@ package.preload["moonsource_zhihu.font"] = function()
|
||||
end
|
||||
|
||||
local Settings = require("utils.settings")
|
||||
Settings.getSource("ext.zhihu").cookie = 'z_c0=saved; d_c0="fixture|1"'
|
||||
Settings.getSource("zhihu").cookie = 'z_c0=saved; d_c0="fixture|1"'
|
||||
local Client = require("moonsource_zhihu.client")
|
||||
local value, error_message, completed
|
||||
local function fetch()
|
||||
@@ -57,7 +57,7 @@ response = Json.encode({ is_fold = false, authentication_result = true, manuscri
|
||||
fetch()
|
||||
Assert.eq(value, "<p>正文</p>")
|
||||
Assert.eq(requested_path, "/remix-web/paid_columns/1/sections/2/manuscript?v=1&manuscript_version=0")
|
||||
Assert.eq(signed_cookie, Settings.getSource("ext.zhihu").cookie)
|
||||
Assert.eq(signed_cookie, Settings.getSource("zhihu").cookie)
|
||||
Assert.eq(request_options.headers.Cookie, signed_cookie)
|
||||
Assert.eq(request_options.headers["x-zse-96"], "fixture")
|
||||
Assert.eq(calls, 0, "没有乱序字体的章节不创建字体任务")
|
||||
@@ -115,4 +115,4 @@ handle.cancel()
|
||||
Assert.eq(http_cancelled, 1)
|
||||
http_cb(response)
|
||||
Assert.eq(completed, 0, "取消 HTTP 后忽略迟到响应")
|
||||
Settings.getSource("ext.zhihu").cookie = nil
|
||||
Settings.getSource("zhihu").cookie = nil
|
||||
Reference in new issue
Block a user