Baidu Netdisk Resource Saver#
Overview#
This skill automates the workflow of searching for resources (movies, TV shows, books, etc.) and saving them to Baidu Netdisk (百度网盘). It combines web search, browser automation, and netdisk operations.
Trigger Patterns (When to Use This Skill)#
This skill should be triggered when user requests match these patterns:
Direct Transfer Requests:
- "请帮我转存[xxx]电影至我的百度网盘"
- "save [xxx] movie to my netdisk"
- "transfer [xxx] to my baidu netdisk"
- "帮我把[xxx]保存到百度网盘"
- "转存[xxx]到网盘"
Search + Save Requests:
- "帮我找[xxx]资源并保存到网盘"
- "search for [xxx] and save to netdisk"
- "找[xxx]电影并转存"
Resource Search:
- "百度网盘[xxx]资源"
- "find [xxx] on baidu netdisk"
- "search [xxx] 百度网盘"
Workflow#
Step 1: Search for Resources#
Use web search (Bing/Baidu) to find Baidu Netdisk share links for the requested content.
Search query format:
text
[资源名称] [年份/版本] 百度网盘 pan.baidu.com
Example searches:
- "查理和巧克力工厂 2005 百度网盘 pan.baidu.com"
- "The Matrix 4K 百度网盘"
- "三体 电视剧 百度网盘"
From search results, extract:
- Share link URL (format:
https://pan.baidu.com/s/[CODE])
- Extraction code/password (提取码) if available
- File name and description
Step 3: Verify and Access Share#
Use browser automation to:
- Navigate to the share link
- Enter extraction code if required
- Verify the file exists and is accessible
- Check file details (name, size, expiration)
Step 4: Save to Netdisk#
Option A: Direct CLI transfer (preferred)
Use bdpan transfer command:
bash
bdpan transfer <share-link> -p <password> -d <target-folder>
Option B: Browser automation
If CLI fails:
- Navigate to share page in browser
- Click "保存到网盘" (Save to Netdisk)
- Select target folder (e.g., "我的资源")
- Confirm save operation
Step 5: Verify Save#
Confirm the file was saved successfully by:
- Checking target folder contents via
bdpan ls
- Or verifying in browser
Common Issues & Solutions#
Issue: Share link expired or invalid#
Solution: Search for alternative links from different sources.
Issue: "转存文件超过可用空间" (Insufficient space)#
Solution:
- Check current usage:
bdpan quota
- Clean up space or purchase expansion
- Report space issue to user
Issue: CLI returns HTTP 400 error#
Solution: Use browser automation instead. Some share links have restrictions that prevent API access.
Issue: Browser login required#
Solution:
- User needs to manually log in via browser first
- Or use the already-authenticated bdpan CLI session
Commands Reference#
bdpan CLI Commands#
bash
# List files
bdpan ls [path]
# Create folder
bdpan mkdir <folder-name>
# Transfer share to netdisk
bdpan transfer <share-link> -p <password> -d <target-folder>
# Download from share
bdpan download <share-link> <local-path> -p <password>
# Check quota
bdpan quota
Browser Commands#
bash
# Start browser
browser start
# Navigate to URL
browser navigate <url>
# Click element
browser click --ref=<ref>
# Type text
browser type --ref=<ref> --text=<text>
# Get page snapshot
browser snapshot
Best Practices#
- Always verify share links before attempting transfer - some may be expired or fake
- Check netdisk space before saving to avoid errors
- Prefer CLI methods for reliability, fallback to browser automation
- Save to organized folders (e.g., "我的资源/电影/", "我的资源/电视剧/")
- Report share information to user: link, password, file size, expiration
Example Sessions#
Example 1: Search + Save Request#
User: "帮我找查理和巧克力工厂的电影资源并保存到网盘"
Agent workflow:
- Search:
查理和巧克力工厂 2005 百度网盘 pan.baidu.com
- Find: Link
https://pan.baidu.com/s/1RuPACBpk-1BY_fZl6DIirA, pwd: fyzv
- Verify via browser: File "133 查理和巧克力工厂 2005" exists
- Check space: 136.2GB/105GB used (full!)
- Report to user: Found resource but netdisk full, needs cleanup
Example 2: Direct Transfer Request#
User: "请帮我转存星际穿越电影至我的百度网盘"
Agent workflow:
- Parse: User wants to transfer "星际穿越" movie to netdisk
- Search:
星际穿越 百度网盘 pan.baidu.com
- Find and verify available share links
- Attempt transfer via
bdpan transfer or browser automation
- Report success or specific error (space full, link expired, etc.)
Example 3: English Request#
User: "Save The Matrix to my netdisk"
Agent workflow:
- Parse: User wants "The Matrix" movie saved
- Search:
The Matrix 百度网盘 pan.baidu.com
- Find share link with extraction code
- Transfer to user's "我的资源" folder
- Confirm save location and file details
References#
For detailed browser automation patterns, see references/browser-patterns.md