plugin/kkv/html结构分析.md
http://kkv.q-23.cn/?s={keyword}
容器: article.post (多个article元素)
id="post-{id}" (如 id="post-72474")post-{id} post type-post status-publish format-standard hentry category-{category}每个搜索结果包含:
.entry-header h2.entry-title a
http://kkv.q-23.cn/?p={id}.entry-meta time.entry-date
.entry-meta time.entry-modified-date.updated
.entry-summary 或 .entry-summary p?p=(\d+)h2.entry-title a 获取time.updated 的datetime属性获取http://kkv.q-23.cn/?p={id}
.entry-header h1.entry-title.entry-meta time.entry-date (datetime属性).entry-meta time.updated (datetime属性).entry-meta .categories-links a.entry-content p (第一个p标签)
.entry-content #link-report span网盘链接在 .entry-content 中,位于 <hr/> 标签之后的区域
链接格式示例:
<p>
视频:<a href="https://pan.xunlei.com/s/VOeeCkzFwv09p0ERN-vV4vQ1A1?pwd=f26g#">迅雷云盘</a>
</p>
<p>
视频:<a href="https://pan.baidu.com/s/1NWbakSbG1rLZnM9x2KrSZA?pwd=1234">百度网盘</a>
提取码:1234
</p>
<p>
视频:<a href="https://pan.quark.cn/s/xxx">夸克网盘</a>
</p>
<p>
视频:<a href="https://www.alipan.com/s/xxx">阿里云盘</a>
</p>
.entry-content 下的所有 <p> 标签<a> 标签的段落?pwd= 参数提取根据插件开发指南,需要识别以下网盘类型:
| 网盘名称 | 类型标识 | 域名特征 |
|---|---|---|
| 夸克网盘 | quark | pan.quark.cn |
| UC网盘 | uc | drive.uc.cn |
| 百度网盘 | baidu | pan.baidu.com |
| 阿里云盘 | aliyun | aliyundrive.com, alipan.com |
| 迅雷网盘 | xunlei | pan.xunlei.com |
| 天翼云盘 | tianyi | cloud.189.cn |
| 115网盘 | 115 | 115.com, anxia.com |
| 123网盘 | 123 | 123pan.com, 123684.com 等 |
| 移动云盘 | mobile | caiyun.139.com |
| PikPak | pikpak | mypikpak.com |
http://kkv.q-23.cn/?s={URLEncode(keyword)}article.post 元素?p= 参数).entry-content 中查找所有包含网盘链接的段落// 1. 从URL参数提取
pwd := url.Query().Get("pwd")
// 2. 从文本中提取
patterns := []string{
`提取码[::]\s*([a-zA-Z0-9]{4})`,
`密码[::]\s*([a-zA-Z0-9]{4})`,
`pwd[::]\s*([a-zA-Z0-9]{4})`,
}
// 3. 密码验证(必须是4位)
if len(pwd) == 4 {
return pwd
}
// 从datetime属性提取
timeStr := doc.Find("time.updated").AttrOr("datetime", "")
// 格式: 2025-12-06T20:26:57+08:00
t, _ := time.Parse(time.RFC3339, timeStr)
kkv-{影片ID}SearchResult{
UniqueID: "kkv-30027",
Title: "[凡人修仙传][更新至172集][动画]",
Content: "导演: 伍镇焯 / 王裕仁 编剧: 忘语...",
Links: []Link{
{Type: "xunlei", URL: "https://pan.xunlei.com/s/xxx", Password: "f26g"},
{Type: "baidu", URL: "https://pan.baidu.com/s/xxx", Password: "1234"},
},
Channel: "",
Datetime: time.Parse(...),
}
建议设置为优先级3(标准网盘搜索插件)
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Referer: http://kkv.q-23.cn/