♻️ 书源 id 去掉 ext. 前缀,沿用旧内置源数据
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
b342ac7ea1
commit
742da8a95d
6 files changed
+6
-6
No files matched your search
@@ -9,7 +9,7 @@
|
||||
local _ = require("l10n").get("moonsource_tadu")
|
||||
|
||||
return {
|
||||
id = "ext.tadu",
|
||||
id = "tadu",
|
||||
name = _("塔读小说"),
|
||||
type = "chapter",
|
||||
description = _("塔读书架与在线阅读"),
|
||||
|
||||
@@ -12,7 +12,7 @@ local Text = require("utils.text")
|
||||
local _ = require("l10n").get("moonsource_tadu")
|
||||
|
||||
local Client = {}
|
||||
local SOURCE_ID = "ext.tadu"
|
||||
local SOURCE_ID = "tadu"
|
||||
local ORIGIN = "https://www.tadu.com"
|
||||
|
||||
function Client.cookie()
|
||||
|
||||
@@ -8,7 +8,7 @@ local Text = require("utils.text")
|
||||
|
||||
local Mapper = {}
|
||||
|
||||
local SOURCE_ID = "ext.tadu"
|
||||
local SOURCE_ID = "tadu"
|
||||
|
||||
--- 目录缓存格式。首章携带,变了就当缓存失效。
|
||||
Mapper.TOC_VERSION = 1
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
local _ = require("l10n").get("moonsource_tadu")
|
||||
local CookieLogin = require("source.cookie_login")
|
||||
|
||||
local SOURCE_ID = "ext.tadu"
|
||||
local SOURCE_ID = "tadu"
|
||||
local Setting = {}
|
||||
local LOGIN_URL = "https://www.tadu.com/v3/loginpage"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Assert.eq(found[1].title, "三体宇宙")
|
||||
Assert.eq(found[1].authors, "刘慈欣")
|
||||
Assert.eq(found[1].intro, "星际")
|
||||
Assert.eq(found[1].cover, "https://img/a.jpg")
|
||||
Assert.eq(found[1].source_id, "ext.tadu")
|
||||
Assert.eq(found[1].source_id, "tadu")
|
||||
|
||||
local home, home_err = Mapper.shelfPage("<title>小说,小说网-塔读小说网|免费阅读最新热门小说</title>")
|
||||
Assert.is_nil(home)
|
||||
|
||||
@@ -211,7 +211,7 @@ Chapter.openAsync = function(_source, identity, _book, _opts, ops, cb)
|
||||
end)
|
||||
end
|
||||
require("moonsource_tadu.source").new():openBookAsync({
|
||||
source_id = "ext.tadu", stable_id = "font-fixture", book = { title = "书名" },
|
||||
source_id = "tadu", stable_id = "font-fixture", book = { title = "书名" },
|
||||
}, { chapter_idx = 1 }, function() end)
|
||||
Chapter.openAsync = open_async
|
||||
Assert.is_true(document:find(decoded, 1, true) ~= nil)
|
||||
|
||||
Reference in new issue
Block a user