Baidu Netdisk batch transfer program is built on Python 3.10 + Tkinter , and is mainly used to batch transfer resources shared on the network to your own Baidu Netdisk. In addition, it also has the functions of batch sharing and batch detection of link effectiveness.
Program main interface:
The program development and compilation environment is Win10 x64 professional version. The operating system can be downloaded and run directly Win7 or above. Other operating systems need to compile or configure the running environment by themselves.
Download method:
exe file, the file name is BaiduPanFilesTransfers.exe , and you can open it directly after downloading.BaiduPanFilesTransfers.zip , please unzip it after downloading.If you have run an old version before, just overwrite the old file with the new version file and use it.
Manual compilation requires Python 3.6 or above to be installed in advance.
The compilation steps are as follows:
Clone this project on the host with Git installed:
git clone https://github.com/hxz393/BaiduPanFilesTransfers.git Or click the blue <> Code button on the project homepage to select the Download ZIP option, download the source code compression package, and decompress the compression package after downloading.
Switch to the path of this project from the command line.
For example, in Windows, open a CMD command prompt or PowerShell and enter:
cd B: 2 .脚本B aiduPanFilesTransfers-masterIn Linux/macOS, the path separator will be different:
cd /root/BaiduPanFilesTransfers-master If you use PyCharm as the IDE, you can directly enter the subsequent packaging command in the built-in console.
Create and enable a virtual environment using venv :
python -m venv venv
venv S cripts a ctivateThe command to start a virtual environment under Linux/macOS is slightly different:
python -m venv venv && source venv/bin/activate
Installation project dependencies, specify the use of the mirror source of the University of Science and Technology of China:
pip install -r requirements.txt --index https://mirrors.ustc.edu.cn/pypi/web/simple/ The Python installation package for Windows will generally install Tkinter by default. macOS users need to install it manually, and the corresponding Homebrew command is:
brew install python-tk # 也可以指定 Python 版本,如 brew install [email protected] Use the pyinstaller command to compile and package it into an executable file:
pyinstaller -F -w -i BaiduPanFilesTransfers.ico --hidden-import=tkinter --clean -n BaiduPanFilesTransfers BaiduPanFilesTransfers.py If the process does not have any exceptions, the executable file BaiduPanFilesTransfers.exe will be generated under dist directory.
(Optional) Use the deactivate command to exit the current environment:
venvScriptsdeactivate.bat
Please submit pull request to the dev branch, and wait for my verification to pass and merge it into the main branch.
This program adopts the GPL-3.0 license source license agreement. If it violates the basic principles of the open source community, it will be a privately owned business purpose, which is a violation and I will pursue legal responsibility.
Getting Cookies is a necessary step. Most operational errors are caused by incorrect cookies. Please read the obtaining method carefully.
Use Chrome or similar browser (preferably in traceless window mode) to log in to the Baidu Netdisk homepage, press F12 after it is fully loaded. Select网络(Network) tab.
As shown in the figure below, it should be empty at the moment: Press F5 to refresh the page, and multiple records will be added below. Click on the record starting with main . A menu will appear on the right, showing标头(Headers) ,响应(Response) etc. Flip down on the header page and find the line in the request header that starts with Cookie: followed by a string of content starting with XF . This is Cookies you need to find. Select them all, right-click to select Copy, and paste them into the corresponding input box of the program:
Note that you must obtain the cookies under main page . The cookies on other pages are incomplete and various transfer failures will occur. Direct access to address: main page
If the save location is left blank and not filled in, the resource will be saved to the root directory. Open the Baidu Netdisk homepage and you will see it.
After entering the file save location, if the directory does not exist, a new directory will be created automatically. If the directory already exists, it will be directly transferred to the specified directory.
Supports specifying secondary directories. For example, if you want to save them to the 2024-01-02 directory in the test directory, just fill in test/2024-01-02 .
The save location (directory name) cannot contain most special symbols in English, including: > , | , * , ? , : , etc. Otherwise, the program will detect and interrupt the operation.
If the length of the save path plus file name exceeds 255 characters, it will fail when downloading the file using Baidu Netdisk client, so you should try to use the short directory name.
The program has adapted to the common Baidu network disk link format as much as possible. If the prompt "Unsupported link" or "Link error" appears, please check whether the input link complies with one of the following formats:
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 z6r4After all the information is entered, click the "Batch Transfer" button to perform the batch transfer Baidu network disk link.
During the transfer process, you can "pause/recover" or you can directly click the close button in the upper right corner of the program window to abort the run.
If you want to speed up the transfer speed, you can open more programs and transfer them in batches at the same time. The total transfer speed should not exceed 60 links per minute.
Batch sharing refers to sharing files or folders in a specified directory, each generating a sharing link. ==Baidu Netdisk has now launched a batch sharing function, which can be operated on the web side and is given priority. ==
Before performing batch sharing, you also need to enter Cookies and the target path to share, and then click the "Batch Sharing" button to prepare for execution. A share settings pop-up window will pop up:
After setting the sharing period and extraction code (supporting random), click OK to start batch sharing, please wait for the run to complete. At this time, the file name to be shared will be inserted in the original link input box; the generated sharing link and results will be displayed in the log input box:
Baidu Netdisk is hard restricted. A single account can only create up to 300 sharing links per day , and an error will be reported later, which is not a program restriction.
The program will bypass the network system proxy by default, but cannot bypass the network global proxy.
If you are in a special network environment, you need to configure the network system proxy mode to access Baidu network disk normally. After checking the "System Proxy" box, then perform the transfer.
Used to specify the transfer of files to multiple different directories. The effects are as follows:
After checking, links similar to自设目录https://pan.baidu.com/s/1eOrU0S9VLoe4GgAy2gZlmw z6r4 will be supported.自设目录will be created to the "Restoration Directory" (the directory entered in step 2) and the file will be transferred to自设目录.
If you enter a normal link, that is, a link that starts with http without the directory name, then each link will be saved separately in a subdirectory named with the number. For example, the first link is saved in test test/1 , the second link is saved in test/2 , and so on.
Note that this mode requires that the transfer directory must be entered . The specified directory name in the connection cannot contain spaces , otherwise only the previous space will be taken as the directory name.
After checking this mode, click "Batch Transfer" to run it. The link availability of the entered will be checked and the transfer operation will not be performed:
Please do not frequently detect the same link , as it will cause verification code to be popped.
When using the program, first check out some of the common problems and solutions summarized below. Check if there are any problems in all Issues. If none of them help, submit feedback.
The problems that arise when releasing ordinary links were initially discovered on 2023.09.20.
Reason : Baidu Netdisk cookies are adjusted, and the original saved cookies can no longer be used.
Solution : Re-get new cookies in your browser and it will work normally.
An error occurred when transferring the old version to the link in seconds.
Cause : The second pass can no longer be used.
Solution : In the new version, the relevant code has been removed, please upgrade to the new version.
The program suddenly cannot be transferred.
Cause : The cookie is invalid or incorrect; Baidu Netdisk is revised and the program is invalid.
Solution : First try to open the Baidu Netdisk homepage through the browser's traceless mode, and log in to see if the cookies can work normally. If you change too many computers and accounts and don’t work, it means that the program needs to be repaired and updated. Issue feedback can be submitted.
The following link prompts "Too many link visits".
Cause : The cookie is incorrect.
Solution : Open the Baidu Netdisk homepage through the browser's traceless mode and log in again to obtain cookies.
Reason : It is usually seen in links with extraction codes. If you visit a link more than 3 times in a short period of time, regardless of whether the extracted code is correct, the Baidu Netdisk defense mechanism will be triggered. If you access the link directly on the web page, you will find that you want to enter the verification code.
Solution : Only affects a single link, and other links can be transferred normally. You can manually transfer individual problem links. If all links report this error, refer to the solution to the problem "Only the first link is successfully transferred"
If you transfer 1,000 links in succession, and one more link will report an error, and the error code will be very strange. Even the web page cannot be transferred anymore, prompting "Data error, please try again later".
Reason : Baidu Netdisk is based on IP address blockade, prohibiting users from transferring large amounts of storage.
Solution : You can restart the dialing router and replace the external IP address. If you need to use a proxy server, please check "Use System Proxy".
Reason : Generally, it is common for folder transfer. Free users are restricted by Baidu. If the number of files in the folder exceeds 500, it will prompt "the number of files transferred exceeds the limit."
Solution : I don’t plan to support it for the time being, the efficiency is too low. If you need it, you can leave some other open source or free projects. It is recommended to open Baidu Netdisk membership to lift the restrictions.
Release group files are not supported. It is recommended to manually operate the transfer, or use special tools.
For operating systems with Win 10 or below, the runtime prompts that the necessary dll files are missing.
Cause : 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.
Sometimes, even though the transfer is successful, the prompt is "The transfer failed, and there is a file or folder of the same name in the directory.
Reason : The triggering mechanism is unknown, please provide clues.
Solution : It is best to confirm on the web page whether it is false reporting or there is a file with the same name but actually a different file. Manually transfer the storage according to the situation, or check the "Safe Transfer" function.
To avoid the update log being too long, only the most recent update log is retained.
Fixed content:
Updated content:
Updated content:
Updated content:
ttkbootstrap to beautify the interface;Updated content:
Updated content:
Fixed content:
python 3.6 , Win7 system can also be used;Fixed content:
Fixed content: