plugin/alupan/html结构分析.md
www.aliupan.comhttps://www.aliupan.com/?s={关键词}
archive-header)section.container > .content-wrap > .contentarticle.excerpt(常见类名 excerpt-titletype)<article class="excerpt excerpt-titletype">
<div class="focus">
<a href="https://www.aliupan.com/?p=7078" class="thumbnail">
</a>
</div>
<header>
<a class="label label-important" href="https://www.aliupan.com/?cat=19">中国内地电视剧<i class="label-arrow"></i></a>
<h2>
<a href="https://www.aliupan.com/?p=7078" title="...">[阿里云盘][夸克网盘]《遮天》(2023年)</a>
</h2>
</header>
<p>
<span class="muted"><i class="icon-user"></i><a href="...">阿里U盘</a></span>
<span class="muted"><i class="icon-time"></i> 1年前 (2024-07-27)</span>
<span class="muted"><i class="icon-eye-open"></i> 745浏览</span>
<span class="muted"><i class="icon-comment"></i><a href="...">0评论</a></span>
</p>
<p class="note">……摘要文本……</p>
</article>
h2 a 文本h2 a[href].label.label-important 文本(可作为 Tags 之一)p > span .icon-time 所在 <span>,格式通常为 1年前 (2024-07-27);取括号内日期p.notediv.focus img[src](仅用于调试,不需要在结果中返回)https://www.aliupan.com/?p={文章ID}
文章ID 来自列表页 URL,可直接作为唯一标识。.article-header .article-title a.meta(含分类、作者、时间、阅读)article.article-content正文中使用普通段落给出下载地址:
<p>阿里云盘丨遮天:<a href="https://www.aliyundrive.com/s/xxxx" target="_blank" rel="nofollow">https://www.aliyundrive.com/s/xxxx</a></p>
<p>夸克网盘丨遮天:<a href="https://pan.quark.cn/s/5ad996dc0725" target="_blank" rel="noreferrer noopener nofollow">https://pan.quark.cn/s/5ad996dc0725</a></p>
<a>。提取码:xxxx、密码:xxxx 等。https://www.aliyundrive.com/s/、https://www.aliyundrive.com/drive/folder/https://pan.quark.cn/s/pan.baidu.com 等)| 数据项 | 选择器/规则 |
|---|---|
| 列表项 | article.excerpt |
| 标题 & 链接 | article.excerpt h2 a |
| 分类标签 | article.excerpt header .label |
| 摘要 | article.excerpt p.note |
| 发布时间 | article.excerpt p .icon-time 所在 <span>;取括号中的日期 |
| 正文容器 | article.article-content |
| 网盘链接 | .article-content a[href*="pan.quark.cn"]、a[href*="aliyundrive.com"] 等 |
搜索页
https://www.aliupan.com/?s=keyword,使用浏览器 UA、防爬 Header。article.excerpt,抓取基本元信息。?p={id} 提取 ID,构建唯一键 alupan-{id}。详情页
.article-content。<a>,通过域名判断网盘类型。提取码/密码/pwd/code)。时间解析
YYYY-MM-DD)。YYYY-MM-DD 或 YYYY年MM月DD日,按常见格式匹配;失败则用当前时间。性能优化建议
http.Client(连接池 + TLS/Expect 超时 + HTTP/2)。1. 请求 https://www.aliupan.com/?s=遮天
2. 列表项:
- 标题: [阿里云盘][夸克网盘]《遮天》(2023年)
- 分类: 中国内地电视剧
- 日期: 1年前 (2024-07-27)
- 摘要: 阿里云盘丨遮天:待补 夸克网盘丨遮天:https://pan.quark.cn/...
- 详情: https://www.aliupan.com/?p=7078
3. 详情解析:
- `https://pan.quark.cn/s/5ad996dc0725`
4. 构建结果:
UniqueID: alupan-7078
Title: [阿里云盘][夸克网盘]《遮天》(2023年)
Links: [{Type:"quark", URL:"https://pan.quark.cn/s/5ad996dc0725", Password:""}]
Tags: ["中国内地电视剧"]
Datetime: 2024-07-27T00:00:00+08:00