feat: add yunpan1 search source
- sites/yunpan1/v1/: 新增云盘资源分享社区搜索源 - intro.md: 论坛介绍、板块列表 - urls.md: 站点链接、Cookie 维护说明 - usage.md: 搜索脚本使用、登录流程 - yunpan1_search.py: Python 搜索脚本(标准库零依赖) - .gitignore: 追加 .idea/ __pycache__/ *.pyc Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# yunpan1 — 获取资源
|
||||
|
||||
## Python 脚本搜索(推荐)
|
||||
|
||||
依赖:Python 标准库(无需额外安装)
|
||||
|
||||
```bash
|
||||
py -X utf8 sites/yunpan1/v1/yunpan1_search.py <关键词>
|
||||
```
|
||||
|
||||
示例:
|
||||
|
||||
```bash
|
||||
py -X utf8 sites/yunpan1/v1/yunpan1_search.py 遮天
|
||||
py -X utf8 sites/yunpan1/v1/yunpan1_search.py 完美世界
|
||||
```
|
||||
|
||||
搜索结果:
|
||||
- **完整夸克链接**(12 位 ID,可直接转存到夸克网盘)
|
||||
- **被截断的链接**(部分帖子在搜索结果中截断了链接,需点进帖子查看)
|
||||
- 链接自动保存到 `tmp/quark_links.txt`
|
||||
|
||||
首次搜索因 Discuz! 后端建索引可能等待 1-2 分钟,同一关键词后续秒回。
|
||||
|
||||
## Cookie 维护
|
||||
|
||||
搜索需要登录态,Cookie 保存在 `tmp/yunpan1_cookies.txt`,约 1 天过期。
|
||||
|
||||
Cookie 过期后通过 Playwright 重新登录获取:
|
||||
|
||||
```javascript
|
||||
// Playwright 登录流程
|
||||
await page.goto('https://yunpan1.cc/member.php?mod=logging&action=login');
|
||||
await page.locator('form[name="login"] input[name="username"]').fill('向用户索要邮箱');
|
||||
await page.locator('form[name="login"] input[name="password"]').fill('向用户索要密码');
|
||||
await page.locator('form[name="login"] button[name="loginsubmit"]').click();
|
||||
// 等待跳转回首页确认登录成功
|
||||
|
||||
// 提取 Cookie 保存到文件
|
||||
const cookies = await page.context().cookies();
|
||||
// 关键 Cookie: 2dF6_2132_auth, 2dF6_2132_saltkey, 2dF6_2132_lastvisit
|
||||
```
|
||||
|
||||
## 直接浏览板块
|
||||
|
||||
```
|
||||
动漫:https://yunpan1.cc/forum.php?mod=forumdisplay&fid=3
|
||||
影视:https://yunpan1.cc/forum.php?mod=forumdisplay&fid=2
|
||||
```
|
||||
|
||||
## 拿到链接后的操作
|
||||
|
||||
夸克链接转存流程见 `storage/quark/v1/usage.md`
|
||||
Reference in New Issue
Block a user