Last update at :2024-02-10,Edit by888u
I believe many friends are using Baidu Netdisk. The current speed for non-members is really very pitiful. If you have a mine at home, you can ignore the following content. Today I would like to share with you an open source network disk download project BaiduPCS-Go (Click to go to the author's gitgub source code hosting platform). Written in Go language, Baidu Netdisk command line client imitates Linux shell file processing commands. Multi-platform support, supports Windows, macOS, linux, mobile devices, etc.
Project download address, according to your own Select the corresponding download package for your operating system. The downloaded and decompressed directory is as follows:
The default local path for downloading files/directories is the download folder. You can use the command to specify the local download path.
Because the README introduces the use of command line commands in detail, I will only introduce a few main functions:
Login
BaiduPCS-Go login
List directories
List files and directories in the current working directory or specify a directory
BaiduPCS-Gols BaiduPCS-Gols
Switch working directory
BaiduPCS-Go cd
Download files/directories
BaiduPCS-Go download... BaiduPCS-Go d...
Optional parameters
-test: Test download, this operation will not save the file locally -status: Output the working status of all threads --save: Save the downloaded file directly to the current working directory --saveto: Save the downloaded file directly to the specified directory -x: Add execution permission to the file (invalid in Windows system) -p: Specify the maximum concurrent download amount
Just take a screenshot and the download speed is quite impressive!
Upload files/directories
BaiduPCS-Go upload... BaiduPCS-Go u...
- Uploaded files will be saved to, .
- When encountering a file with the same name, it will be automatically overwritten!!
- When the uploaded file name is the same as the directory name of the network disk, the directory will not be overwritten to prevent data loss.
List the directory after the upload is complete:
Isn’t it great? It’s a tool of conscience, hurry up and use it!
403 solution
Many friends will encounter 403 errors when downloading. The solution is as follows:
1. Create the baidu_shurufa directory
First use a browser to log in to Baidu Netdisk. After successful login, visit the following URL:
http://pcs.baidu.com/rest/2.0/pcs/file?app_id=265486&method=list&path=%2F
The webpage will display content similar to the following:
{"error_code":31064,"error_msg":"file is not authorized","request_id":******************}Then enter Baidu Netdisk and enter the "My Application Data" directory. There will be a directory named baidu_shurufa. This directory is the directory we need. Move the files or folders that need to be downloaded to this directory.
2. Set appid
First enter the BaiduPCS-Go program directory and execute the program, then use the following command to enter the baidu_shurufa directory:
cd /apps/baidu_shurufaUse the following command to set appid to 265486:
config set -appid=265486After completing the above two steps, just restart the file download and see if the 403 Forbidden problem has been completely resolved. If the download speed is not ideal, you can use the following command to set the maximum concurrent download amount. Note that the recommended value for the maximum concurrent download is 50~500. If it is too low, the download speed will not be significantly improved or even the speed will become 0. If it is too high, the program may error and be terminated by the operating system. This article takes setting the maximum concurrency to 350 as an example:
config set -max_parallel 350After the settings are completed, just restart the download, which can usually be solved
Recommended site searches: dual-line dual-ip, network server, Hong Kong host, mainland China ip proxy, server space rental, US server website, US vps host, registered domain name query, US free virtual host, registered space, p>
发表评论