程序介绍
百度网盘批量转存程序,基于 Python 3.10
+ Tkinter
构建,主要用于批量转存网络上分享的资源到自己的百度网盘。此外还带有批量分享和批量检测链接有效性的功能。
程序主界面:
下载及运行
程序开发编译环境为 Win10 x64
专业版,操作系统 Win7
以上可直接下载运行,其他操作系统需要自行编译或配置运行环境。
下载方式:
- 方式一:到 release 页面下载最新版的
exe
文件,文件名为BaiduPanFilesTransfers.exe
,下完可直接打开使用。 - 方式二:到 百度网盘 下载对应压缩包
BaiduPanFilesTransfers.zip
,下完后请解压缩再使用。
如果之前有运行过旧版本,直接用新版本文件覆盖掉旧文件即可使用。
手动编译
手动编译需要事先安装好 Python 3.6
以上版本。
编译步骤如下:
-
在安装有
Git
的主机上克隆本项目:git clone https://github.com/hxz393/BaiduPanFilesTransfers.git
或者在 项目主页 点击蓝色
<> Code
按钮选择Download ZIP
选项,下载 源码压缩包,下载完毕后解压缩压缩包。 -
在命令行中切换到本项目路径。
例如,在 Windows 中,打开
CMD
命令提示符或PowerShell
,输入:cd B:\2.脚本\BaiduPanFilesTransfers-master
在 Linux/macOS 中,路径的分隔符会不同 :
cd /root/BaiduPanFilesTransfers-master
如果使用
PyCharm
作为 IDE,可以直接在自带的控制台中输入后面的打包命令。 -
使用
venv
创建并启用虚拟环境:python -m venv venv venv\Scripts\activate
在 Linux/macOS 下启动虚拟环境命令稍有不同:
python -m venv venv && source venv/bin/activate
-
安装项目依赖,指定使用国内科大的镜像源:
pip install -r requirements.txt --index https://mirrors.ustc.edu.cn/pypi/web/simple/
Windows 的 Python 安装包一般会默认安装
Tkinter
。macOS 用户则需要手动安装,对应 Homebrew 命令为:brew install python-tk # 也可以指定 Python 版本,如 brew install python-tk@3.12
-
使用
pyinstaller
命令编译打包成可执行文件:pyinstaller -F -w -i BaiduPanFilesTransfers.ico --hidden-import=tkinter --clean -n BaiduPanFilesTransfers BaiduPanFilesTransfers.py
如果过程没有异常,可执行文件
BaiduPanFilesTransfers.exe
会生成到dist
目录下面。 -
(可选)使用
deactivate
命 令退出当前环境:venv\Scripts\deactivate.bat
代码贡献
请提交 pull request 到 dev 分支,待我验证测试通过再合并到主分支。
开源许可
本程序采用 GPL-3.0 license 源授权许可协议,如果违反开源社区的基本准则,将开源项目据为私有用于商业用途,属于侵权行为,本人将追究法律责任。
程序使用
获取 Cookies 是必须步骤,大多数运行错误都是由 Cookies 不正确造成的,请仔细阅读获取方法。
获取 Cookies
使用 Chrome
或类似浏览器(最好用无痕式窗口模式)登录 百度网盘主页,完全载入后按 F12
键调出控制台。选择 网络(Network)
选项卡。
如下图所示,此时应该是空白的:
按
F5
刷新页面,下面会出现多条新记录,点击以 main
开头的记录,右边会出现菜单,显示 标头(Headers)
、响应(Response)
等内容。在标头页面向下滚动,找到请求标头中以 Cookie:
开头的行,后面有一串以 XF
开头的内容,这就是需要的 Cookies
。全部选中它们,右键选择复制,然后粘贴到程序相应的输入框内:
注意必须获取 main
页面下的 Cookies,其他页面的 Cookie 不完整,会导致各种转存失败问题。可以直接访问此地址:main 页面
输入保存位置
如果保存位置留空不填, 资源会保存到根目录下,打开百度网盘主页就能看到。
输入文件保存位置后,如果目录不存在,会自动新建目录。如果目录已存在,则直接转存在指定目录下。
支持指定二级目录,例如,要保存到 test
目录内的 2024-01-02
目录中,填入 test/2024-01-02
即可。
保存位置(目录名)不能包含大多数英文特殊符号,包括:>
、|
、*
、?
、:
、\
等,否则程序会检测到并中断运行。
如果保存路径加文件名长度超过 255
个字符,用百度网盘客户端下载文件时会失败,所以应尽量使用短目录名。
输入网盘链接
程序已尽可能适应常见的百度网盘链接格式。如出现提示「不支持的链接」或「链接错误」,请检查输入链接是否符合以下格式之一:
https://pan.baidu.com/s/1nvBwS25lENYceUu3OMH4tg 6img https://pan.baidu.com/s/1nvBwS25lENYceUu3OMH4tg?pwd=6img https://pan.baidu.com/s/1nvBwS25lENYceUu3OMH4tg 提取码:6img https://pan.baidu.com/s/1nvBwS25lENYceUu3OMH4tg 提取:6img https://pan.baidu.com/s/1EFCrmlh0rhnWy8pi9uhkyA https://pan.baidu.com/share/init?surl=W7U9g47xiDez_5ItgNIs0w https://pan.baidu.com/e/1X5j-baPwZHmcXioKQPxb_w rsss 目录名 https://pan.baidu.com/s/1eOrU0S9VLoe4GgAy2gZlmw z6r4
执行批量转存
所有信息输入完毕后,点击「批量转存」按钮来执行批量转存百度网盘链接。
转存过程中可以「暂停/恢复」,也可以直接点击程序窗口右上角的关闭按钮来中止运行。 如果要加快转存速度,可以同时运行多个程序,分批并行转存。总转存速度不要超过每分钟60条链接。
执行批量分享
批量分享是指分享指定目录下的文件或文件夹,为每个项目生成一个分享链接。
执行批量分享前,同样需要先输入"Cookies"和要分享的目标路径,然后点击"批量分享"按钮准备执行。此时会弹出分享设置窗口:
设置好分享期限和提取码(不支持随机生成)后,点击确定开始执行批量分享,请等待运行完成。此时原先的链接输入框内会显示即将分享的文件名;日志输入框内会显示生成的分享链接和结果:
百度网盘有硬性限制,单个账号每天最多只能创建300个分享链接,超过后会报错,这是平台限制而非程序限制。
使用系统代理(可选)
程序默认会绕过网络系统代理,但无 法绕过网络全局代理。
如果处于特殊网络环境,需要配置网络系统代理才能正常访问百度网盘,可勾选"系统代理"选项后再执行转存。
使用指定目录(可选)
用于将转存文件保存到多个不同的目录。效果如下:
勾选后,将支持类似"自设目录 https://pan.baidu.com/s/1eOrU0S9VLoe4GgAy2gZlmw z6r4"的链接格式。"自设目录"会在"转存目录"(步骤2中输入的目录)下创建,文件将转存到"自设目录"中。
如果输入的是普通链接,即不带目录名、以"http"开头的链接,则每个链接将单独保存在以数字命名的子目录中。例如,如果"转存目录"输入的是"test",则第一个链接会保存在"test/1"中,第二个链接保存在"test/2"中,以此类推。
注意,此模式要求必须输入转存目录。链接中的指定目录名不能包含空格,否则只会将空格前的部分作为目录名。
使用检测模式(可选)
勾选此模式后,点击"批量转存"运行,将对输入的链接可用性进行检查,而不执行实际的转存操作:
请勿频繁对相同的链接进行检测,这可能会导致出现验证码。
常见问题
使用程序遇到错误时,请先查看下面总结的一些常见问题和解决方案。然后查看所有Issue中是否有类似问 题。如果这些都无法解决您的问题,再提交反馈。
转存显示成功,但实际上未转存
这个问题在转存普通链接时出现,最初发现于2023年9月20日。
原因:百度网盘调整了cookie机制,不能再使用之前保存的cookie。
解决方法:在浏览器中重新获取新的cookie,之后就可以正常工作。
转存失败,错误代码(31500)
这是旧版本在转存秒传链接时出现的错误。
原因:秒传功能已不再可用。 Solution: In the new version, the relevant code has been removed. Please upgrade to the new version.
Transfer Failed, Error Code XX
The program suddenly cannot transfer files.
Reason: Cookie is invalid or incorrect; Baidu Netdisk has been updated, causing the program to fail.
Solution: First, try opening the Baidu Netdisk homepage in incognito mode of your browser, log in and get a new Cookie to see if it works normally. If it doesn't work after trying multiple computers and accounts, then the program needs to be fixed and updated. You can submit an Issue to report the problem.
Only the First Link Transferred Successfully
Subsequent links show "Link access frequency exceeded".
Reason: Incorrect Cookie.
Solution: Open the Baidu Netdisk homepage in incognito mode of your browser, log in again to get a new Cookie.
Link Access Frequency Exceeded
Reason: Usually occurs with links that have extraction codes. If you access the same link repeatedly more than 3 times in a short period, regardless of whether the extraction code is correct, it will trigger Baidu Netdisk's defense mechanism. If you try to access the link directly on the web, you'll be asked to enter a captcha.
Solution: This only affects individual links; other links can be transferred normally. You can manually transfer the problematic links. If all links report this error, refer to the solution for "Only the First Link Transferred Successfully".
Transfer Count Reached 1000 Limit
After transferring 1000 links consecutively, any additional transfer will result in an error, with various error codes. Even the web interface can't transfer anymore, showing "Data error, please try again later".
Reason: Baidu Netdisk blocks at the IP address level, prohibiting users from massive transfers.
Solution: You can restart your dial-up router to change your external IP address. If you need to use a proxy server, please check "Use System Proxy".
Free User 500 File Transfer Limit
Reason: Generally seen when transferring folders. Free users are restricted by Baidu; if the number of files in a folder exceeds 500, it will prompt "Number of transferred files exceeds the limit".
Solution: Currently not planning to support this due to low efficiency. If needed, you can check other open-source or free projects. It's recommended to subscribe to Baidu Netdisk membership to remove this limitation.
Baidu Group File Transfer
Transferring group files is not supported. It's recommended to transfer manually or use specialized tools.
System Version Too Low
For operating systems below Win 10
, running the program prompts missing necessary dll
files.
Reason: The operating system is too old to support Python 3.10
.
Solution: Upgrade the operating system; or use version 2.4.0
; or refer to the "Self-packaging" method to package it yourself.
File or Folder with the Same Name Already Exists
Sometimes even when the transfer is successful, it prompts "Transfer failed, a file or folder with the same name already exists in the directory".
Reason: The trigger mechanism is unclear. Welcome to provide clues.
Solution: It's best to confirm on the web interface whether it's a false report or if there are actually files with the same name but different content. Manually transfer as needed, or check the "Safe Transfer" feature.
Update Log
To avoid the update log becoming too long, only recent update logs are kept.
Version 2.8.0 (2024.05.11)
Updates:
- Changed the safe transfer feature to a specified directory feature, allowing different links to be saved to different directories in one operation.
Version 2.6.0 (2024.04.09)
Updates:
- 使用
ttkbootstrap
美化界面; - 添加对百度网盘企业版的支持;
- 添加批量分享功能;
- 添加检测模式功能。
版本 2.5.0(2024年3月14日)
更新内容:
- 添加链接自动去重和空格修剪功能;
- 添加暂停恢复功能;
- 添加转存间隔时间。
版本 2.4.0(2023年12月21日)
更新内容:
- 添加安全转存功能。
修复内容:
- 剔除秒传转存相关代码;
- 向下降级到
Python 3.6
版本,Win7
系统也能使用了; - 修复图标模糊问题;
- 代码结构优化调整。
版本 2.3.0(2023年9月8日)
修复内容:
- 修复秒传转存接口。
版本 2.2.2(2023年6月2日)
修复内容:
- 秒传转存 换回旧接口。
编辑推荐精选

酷表ChatExcel
大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


DeepEP
DeepSeek开源的专家并行通信优化框架
DeepEP是一个专为大规模分布式计算设计的通信库,重点解决专家并行模式中的通信瓶颈问题。其核心架构采用分层拓扑感知技术,能够自动识别节点间物理连接关系,优化数据传输路径。通过实现动态路由选择与负载均衡机制,系统在千卡级计算集群中维持稳定的低延迟特性,同时兼容主流深度学习框架的通信接口。


DeepSeek
全球领先开源大模型,高效智能助手
DeepSeek是一家幻方量化创办的专注于通用人工智能的中国科技公司,主攻大模型研发与应用。DeepSeek-R1是开源的推理模型,擅长处理复杂任务且可免费商用。


问小白
DeepSeek R1 满血模型上线
问小白是一个基于 DeepSeek R1 模型的智能对话平台,专为用户提供高效、贴心的对话体验。实时在线,支持深度思考和联网搜索。免费不限次数,帮用户写作、创作、分析和规划,各种任务随时完成!


KnowS
AI医学搜索引擎 整合4000万+实时更新的全球医学文献
医学领域专用搜索引擎整合4000万+实时更新的全球医学文献,通过自主研发AI模型实现精准知识检索。系统每日更新指南、中英文文献及会议资料,搜索准确率较传统工具提升80%,同时将大模型幻觉率控制在8%以下。支持临床建议生成、文献深度解析、学术报告制作等全流程科研辅助,典型用户反馈显示每周可节省医疗工作者70%时间。


Windsurf Wave 3
Windsurf Editor推出第三次重大更新Wave 3
新增模型上下文协议支持与智能编辑功能。 本次更新包含五项核心改进:支持接入MCP协议扩展工具生态,Tab键智能跳转提升编码效率,Turbo模式实现自动化终端操作,图片拖拽功能优化多模态交互,以及面向付费用户的个性化图标定制。系统同步集成DeepSeek、Gemini等新模型,并通过信用点数机制实现差异化的资源调配。


腾讯元宝
腾讯自研的混元大模型AI助手
腾讯元宝是腾讯基于自研的混元大模型推出的一款多功能AI应用,旨在通过人工智能技术提升用户在写作、绘画、翻译、编程、搜索、阅读总结等多个领域的工作与生活效率。


Grok3
埃隆·马斯克旗下的人工智能公司 xAI 推出的第三代大规模语言模型
Grok3 是由埃隆·马斯克旗下的人工智能公司 xAI 推出的第三代大规模语言模型,常被马斯克称为“地球上最聪明的 AI”。它不仅是在前代产品 Grok 1 和 Grok 2 基础上的一次飞跃,还在多个关键技术上实现了创新突破。


OmniParser
帮助AI理解电脑屏幕 纯视觉GUI元素的自动化解析方案
开源工具通过计算机视觉技术实现图形界面元素的智能识别与结构化处理,支持自动化测试脚本生成和辅助功能开发。项目采用模块化设计,提供API接口与多种输出格式,适用于跨平台应用场景。核心算法优化了元素定位精度,在动态界面和复杂布局场景下保持稳定解析能力。


流畅阅读
AI网页翻译插件 双语阅读工具,还原母语级体验
流畅阅读是一款浏览器翻译插件,通过上下文智能分析提升翻译准确性,支持中英双语对照显示。集成多翻译引擎接口,允许用户自定义翻译规则和快捷键配置,操作数据全部存储在本地设备保障隐私安全。兼容Chrome、Edge、Firefox等主流浏览器,基于GPL-3.0开源协议开发,提供持续的功能迭代和社区支持。
推荐工具精选
AI云服务特惠
懂AI专属折扣关注微信公众号
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号