欢迎光临
我们一直在努力

[CentOS/Ubuntu…]Linux 下载 Google Drive/Docs(谷歌硬盘/文档)

下载别人在 Google Drive 分享的文件” 工具

1. 环境要求

  • wget 命令

这个一般 Linux 系统都有 wget,如果没有,请使用系统自带的包管理器安装。

1. 如 CentOS 执行 sudo yum install wget -y 安装

2. 如 UbuntuDebian… 执行 sudo apt install wget -y 安装

这里仅列出我用过的,其他的自行 GoogleBaiduBing

  • perl 命令

我服务器是 CentOS,默认安装了 perl。其它的就不清楚了,如果没有,请自行 GoogleBaiduBing “如何安装 perl”

  • 能正常访问 Google Drive(这点不再累述

2. 获取脚本

  1. #下载脚本
  2. wget https://raw.githubusercontent.com/circulosmeos/gdown.pl/master/gdown.pl
  3. #给予执行权限
  4. chmod +x gdown.pl

3. 使用此工具

3-1. 语法介绍

  1. ./gdown.pl "Google Drive 文件地址" "保存的文件名"

3-2. 使用实例

举个栗子,我要下载 https://drive.google.com/uc?id=1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz&export=download 里的文件,并把它命名为 [Unofficial]LinageOS_16_mido.zip,则执行以下命令:

  1. ./gdown.pl "https://drive.google.com/uc?id=1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz&export=download" "[Unofficial]LinageOS_16_mido.zip"

在我服务器的执行结果

  1. [root@google 8.8.8.8]# ./gdown.pl "https://drive.google.com/uc?id=1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz&export=download" "[Unofficial]LinageOS_16_mido.zip"
  2. Cannot open cookies file gdown.cookie.temp’: No such file or directory
  3. --2018-10-04 12:19:49-- https://drive.google.com/uc?id=1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz&export=download
  4. Resolving drive.google.com (drive.google.com)... 216.58.219.46, 2607:f8b0:4007:807::200e
  5. Connecting to drive.google.com (drive.google.com)|216.58.219.46|:443... connected.
  6. HTTP request sent, awaiting response... 200 OK
  7. Length: unspecified [text/html]
  8. Saving to: ‘[Unofficial]LinageOS_16_mido.zip
  9. [ <=> ] 3,273 --.-K/s in 0s
  10. 2018-10-04 12:19:49 (26.2 MB/s) - ‘[Unofficial]LinageOS_16_mido.zip saved [3273]
  11. --2018-10-04 12:19:49-- https://docs.google.com/uc?export=download&confirm=Iqag&id=1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz
  12. Resolving docs.google.com (docs.google.com)... 216.58.219.46, 2607:f8b0:4007:807::200e
  13. Connecting to docs.google.com (docs.google.com)|216.58.219.46|:443... connected.
  14. HTTP request sent, awaiting response... 200 OK
  15. Length: unspecified [text/html]
  16. Saving to: ‘[Unofficial]LinageOS_16_mido.zip
  17. [ <=> ] 3,288 --.-K/s in 0s
  18. 2018-10-04 12:19:50 (36.2 MB/s) - ‘[Unofficial]LinageOS_16_mido.zip saved [3288]
  19. --2018-10-04 12:19:50-- https://docs.google.com/uc?export=download&confirm=ZJ6h&id=1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz
  20. Resolving docs.google.com (docs.google.com)... 216.58.219.46, 2607:f8b0:4007:807::200e
  21. Connecting to docs.google.com (docs.google.com)|216.58.219.46|:443... connected.
  22. HTTP request sent, awaiting response... 302 Moved Temporarily
  23. Location: https://doc-10-bg-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/ro9vcgvpcd5dctqcoph9mpgbdggu27fj/1538625600000/18164488606473695945/*/1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz?e=download [following]
  24. Warning: wildcards not supported in HTTP.
  25. --2018-10-04 12:19:50-- https://doc-10-bg-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/ro9vcgvpcd5dctqcoph9mpgbdggu27fj/1538625600000/18164488606473695945/*/1GEnu4VboPXz7cLpFaS3Cd7QZZNtFYHgz?e=download
  26. Resolving doc-10-bg-docs.googleusercontent.com (doc-10-bg-docs.googleusercontent.com)... 216.58.219.33, 2607:f8b0:4007:807::2001
  27. Connecting to doc-10-bg-docs.googleusercontent.com (doc-10-bg-docs.googleusercontent.com)|216.58.219.33|:443... connected.
  28. HTTP request sent, awaiting response... 200 OK
  29. Length: unspecified [application/zip]
  30. Saving to: ‘[Unofficial]LinageOS_16_mido.zip
  31. [ <=> ] 571,841,706 100MB/s in 6.8s
  32. 2018-10-04 12:19:57 (80.6 MB/s) - ‘[Unofficial]LinageOS_16_mido.zip saved [571841706]
  33. [root@google 8.8.8.8]# ls
  34. gdown.pl [Unofficial]LinageOS_16_mido.zip
  35. [root@google 8.8.8.8]#
赞(1)
未经允许不得转载:798VPS » [CentOS/Ubuntu…]Linux 下载 Google Drive/Docs(谷歌硬盘/文档)
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址