From 2c59243e086db37fab1096b6869e9eccfb393a6f Mon Sep 17 00:00:00 2001 From: Ljcbaby <46277145+ljcbaby@users.noreply.github.com> Date: Sun, 16 Feb 2025 12:26:07 +0800 Subject: [PATCH] AlistGo/alist#7965 (#415) --- docs/guide/drivers/baidu.md | 30 +++++++++++++++++++++++------- docs/zh/guide/drivers/baidu.md | 21 ++++++++++++++++++--- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/docs/guide/drivers/baidu.md b/docs/guide/drivers/baidu.md index c65f4c569..ee74cd948 100644 --- a/docs/guide/drivers/baidu.md +++ b/docs/guide/drivers/baidu.md @@ -27,12 +27,12 @@ curl -L -X GET 'YOUR_LINK' -H 'User-Agent: pan.baidu.com' Or use the proxy function in this program to transfer. ::: -### **Refresh token** +## **Refresh token** [Click here](https://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=iYCeC9g08h5vuP9UqvPHKKSVrKFXGa1v&redirect_uri=https://alist.nn.ci/tool/baidu/callback&scope=basic,netdisk&qrcode=1) to get the refresh token. -### **Root folder path** +## **Root folder path** The root foler to mount, defaults to `/` - Mount a folder separately, according to the following format, `/` is the root directory, just extend to that directory if you want to mount that directory @@ -42,7 +42,7 @@ The root foler to mount, defaults to `/` -### **Custom crack ua** +## **Custom crack ua** [**UA used when using 【Native Proxy & Crack API】**](https://github.com/alist-org/alist/issues/5602#issuecomment-1831188682) @@ -50,7 +50,8 @@ The root foler to mount, defaults to `/` -### **Download api** +## **Download api** + - official: The official interface, very stable, but for larger files, UA needs to be modified and the speed is slow (SVIP speed fast) - crack: unofficial interface,You must modify the UA and some files may not have a speed limit, but it will be unstable (not guaranteed 100%availability) Need to use a version greater than `3.19.0` - ==Need to change the UA to`netdisk`==,Modification method refer to [add-user-agent-user-example](#add-user-agent-usage-example) @@ -64,14 +65,13 @@ The root foler to mount, defaults to `/` error_msg: "hit black userlist , hit illeage dlna", request_id: 541111111111111140 } -# This is not a mistake, this is a limit, please do not panic. ```
-### **Add "User-Agent" usage example** +## **Add "User-Agent" usage example** ::::danger If you don't know how to set "User-Agent" see here @@ -134,7 +134,23 @@ If you use the webpage to modify the **`user-agent`**, you do not need to config :::: -### **The default download method used** +## **Upload Config** + +Official Documentation: [百度网盘开放平台 - 上传 - 能力说明](https://pan.baidu.com/union/doc/3ksg0s9ye) + +> Baidu Netdisk requires that each slice be uploaded within 30 seconds, so excessively high concurrency during file uploads may result in a significant number of failures. + +- Upload Threads: The number of slices to upload concurrently. +- Upload API: The domain endpoint used for uploading. +- Custom Upload Slice Size: Allows you to specify the size of each slice. Note that there are limitations, and this feature is available to VIPs only. +- Low Bandwidth Upload Mode: Attempts to address the frequent `Client.Timeout exceeded while awaiting headers` errors encountered in low upload bandwidth scenarios (e.g., residential broadband). When enabled, it uses the smallest possible slice size. + + +
+ + + +## **The default download method used** ```mermaid --- diff --git a/docs/zh/guide/drivers/baidu.md b/docs/zh/guide/drivers/baidu.md index e3436e4ce..c0a45b55d 100644 --- a/docs/zh/guide/drivers/baidu.md +++ b/docs/zh/guide/drivers/baidu.md @@ -117,7 +117,7 @@ flowchart TB -## **Download API** +## **下载接口** - official: 官方接口,很稳定,但是文件比较大,需要修改UA,速度慢 (SVIP速度快) - crack: 非官方接口,现在也需要修改UA且部分文件可能不限速,但是会不稳定(不保证100%可用性)需要使用大于`3.19.0`的版本 @@ -139,7 +139,7 @@ flowchart TB -## **添加 "User-Agent" 使用示例** +### **添加 "User-Agent" 使用示例** ::::danger 如果你不会设置 "User-Agent" 请看这里 @@ -207,7 +207,22 @@ flowchart TB :::: -### **默认使用的下载方式** +## **上传配置** + +官方文档:[百度网盘开放平台 - 上传 - 能力说明](https://pan.baidu.com/union/doc/3ksg0s9ye) + +> 百度网盘要求在 30s 内完成单个分片的上传,所以上传文件时并发过高可能会导致大量失败。 + +- 上传线程:同时上传几个分片 +- 上传 API:上传的域名端点 +- 自定义上传分片大小:用于指定分片大小,有限制,仅会员可用 +- 低上传带宽模式:尝试解决低上传带宽场景(如家宽)下,频繁出现 `Client.Timeout exceeded while awaiting headers` 的问题。开启后会使用尽可能小的分片大小。 + +
+ + + +## **默认使用的下载方式** ```mermaid ---