liuyuqi-dellpc 10 months ago
parent
commit
a9059638bd
1 changed files with 41 additions and 1 deletions
  1. 41 1
      README.md

+ 41 - 1
README.md

@@ -1,3 +1,43 @@
 # google_dirve_client
 
-中转方式下载google drive 大文件
+中转方式下载google drive 大文件
+
+## 方案一
+
+在 https://developers.google.com/oauthplayground/ 后台, 选择 OAuth 2.0 https://www.googleapis.com/auth/drive.readonly 权限。
+
+选择 Exchange authorization code for tokens 生成token,有效期一个小时。
+
+开一个Vultr 海外主机,命令行下载文件:
+
+```bash
+curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" https://www.googleapis.com/drive/v3/files/YOUR_FILE?alt=media -o OUTPUT_FILE
+
+# 快速搭建web服务器
+npm install -g serve
+serve .
+```
+
+再通过idm下载文件。
+
+
+## 方案二 gdown
+
+```bash
+pip install gdown
+
+gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ
+
+# 文件夹
+gdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl -O /tmp/folder
+```
+这个方案不太好
+
+## Usage
+
+
+
+## Reference
+
+Google 网盘 https://drive.google.com/drive/u/0/home
+