Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlistGo/alist#7965 #415

Merged
merged 1 commit into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions docs/guide/drivers/baidu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,15 +42,16 @@ 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)

<br/>



### **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)
Expand All @@ -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.
```

<br/>



### **Add "User-Agent" usage example**
## **Add "User-Agent" usage example**

::::danger If you don't know how to set "User-Agent" see here

Expand Down Expand Up @@ -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.


<br/>



## **The default download method used**

```mermaid
---
Expand Down
21 changes: 18 additions & 3 deletions docs/zh/guide/drivers/baidu.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ flowchart TB



## **Download API**
## **下载接口**

- official: 官方接口,很稳定,但是文件比较大,需要修改UA,速度慢 (SVIP速度快)
- crack: 非官方接口,现在也需要修改UA且部分文件可能不限速,但是会不稳定(不保证100%可用性)需要使用大于`3.19.0`的版本
Expand All @@ -139,7 +139,7 @@ flowchart TB



## **添加 "User-Agent" 使用示例**
### **添加 "User-Agent" 使用示例**

::::danger 如果你不会设置 "User-Agent" 请看这里

Expand Down Expand Up @@ -207,7 +207,22 @@ flowchart TB

::::

### **默认使用的下载方式**
## **上传配置**

官方文档:[百度网盘开放平台 - 上传 - 能力说明](https://pan.baidu.com/union/doc/3ksg0s9ye)

> 百度网盘要求在 30s 内完成单个分片的上传,所以上传文件时并发过高可能会导致大量失败。

- 上传线程:同时上传几个分片
- 上传 API:上传的域名端点
- 自定义上传分片大小:用于指定分片大小,有限制,仅会员可用
- 低上传带宽模式:尝试解决低上传带宽场景(如家宽)下,频繁出现 `Client.Timeout exceeded while awaiting headers` 的问题。开启后会使用尽可能小的分片大小。

<br/>



## **默认使用的下载方式**

```mermaid
---
Expand Down