♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
088a1a2d94
commit
241cea9599
12 files changed
+21
-21
No files matched your search
@@ -268,7 +268,7 @@ do -- 搜索免登录(不带 Cookie、App UA);书架加 / 删走网页接
|
||||
c:shelfActionAsync("delete", "42", function(r, err) d, e = r, err end)
|
||||
Assert.is_nil(d)
|
||||
Assert.matches(e, "重新登录")
|
||||
Assert.is_true(Auth.expired("ext.fanqie"))
|
||||
Assert.is_true(Auth.expired("fanqie"))
|
||||
Auth.reset()
|
||||
|
||||
-- HTTP 错误给用户只留短句:诊断串(URL/状态码拼接)只进日志;
|
||||
|
||||
@@ -162,7 +162,7 @@ local stored
|
||||
package.preload["book.books_db"] = function()
|
||||
return {
|
||||
reconcile = function(id, books)
|
||||
Assert.eq(id, "ext.fanqie")
|
||||
Assert.eq(id, "fanqie")
|
||||
stored = books
|
||||
return true, 0
|
||||
end,
|
||||
@@ -214,7 +214,7 @@ package.preload["source.chapter"] = function()
|
||||
cb()
|
||||
end,
|
||||
cacheAllAsync = function(source, identity, fetchContent, on_progress, cb, interval)
|
||||
Assert.eq(source.id, "ext.fanqie")
|
||||
Assert.eq(source.id, "fanqie")
|
||||
Assert.eq(interval, 6)
|
||||
on_progress(1, 1)
|
||||
fetchContent(identity, { idx = 1, uid = "9876543210987654321", title = "第一章" }, function(payload)
|
||||
@@ -270,7 +270,7 @@ do
|
||||
source_cfg.category_as_group = nil
|
||||
end
|
||||
|
||||
local ref = { source_id = "ext.fanqie", stable_id = "1234567890123456789" }
|
||||
local ref = { source_id = "fanqie", stable_id = "1234567890123456789" }
|
||||
src:openBookAsync(ref, { chapter_idx = 1 }, function(path)
|
||||
Assert.eq(path, "ready.html")
|
||||
count = count + 1
|
||||
|
||||
@@ -6,7 +6,7 @@ moonsource_fanqie.qrlogin:预热 → 取码 → 轮询 → 跟跳拿 sessionid
|
||||
local Assert = require("support.assert")
|
||||
local Stubs = require("support.stubs")
|
||||
require("source.logout").replaceLibrary = function(id, commit)
|
||||
Assert.eq(id, "ext.fanqie")
|
||||
Assert.eq(id, "fanqie")
|
||||
commit()
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ local html = '<script>(function(){window.__INITIAL_STATE__={"rank":{"book_list":
|
||||
do
|
||||
local rank = Rank.state(html)
|
||||
Assert.eq(rank.rankCategoryTypeList.male[1].name, "西方奇幻")
|
||||
local books = Rank.books(rank, "ext.fanqie")
|
||||
local books = Rank.books(rank, "fanqie")
|
||||
Assert.len(books, 1)
|
||||
Assert.eq(books[1].stable_id, "7654593151348247614")
|
||||
Assert.matches(books[1].title, "在诡异$")
|
||||
|
||||
@@ -30,7 +30,7 @@ src.client.officialGetContentAsync = function(_self, _bid, _iid, cb)
|
||||
return { cancel = function() end }
|
||||
end
|
||||
|
||||
local identity = { source_id = "ext.fanqie", stable_id = "fanqie-toc-anchors" }
|
||||
local identity = { source_id = "fanqie", stable_id = "fanqie-toc-anchors" }
|
||||
local poison = '<h2 id="toc_99">不该扫到</h2><p>旧正文</p>'
|
||||
|
||||
local function writeChapterHtml(idx, html)
|
||||
|
||||
Reference in new issue
Block a user