0

我正在编写批处理脚本.. 将使用 wget 从谷歌文档下载。

我从谷歌公司收到 SSL 错误。

这是代码 wget(从此链接Windows 批处理文件文件从 URL 下载

@echo off

for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set y=%%k
for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set t=%%i%%j
set t=%t%_
if "%t:~3,1%"=="_" set t=0%t%
set t=%t:~0,4%
set "theFilename=%d%%t%"
echo %theFilename%

@pause
cd "C:\Users\MYNAME\Documents\TemObv\GnuWin32\bin"
wget.exe --output-document C:\Users\MYNAME\Documents\TemObv\file_%theFilename%.tsv https://docs.google.com/spreadsheet/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&single=true&gid=0&range=A5&output=txt
@pause

这是来自 wget 的 ssl 错误

Resolving docs.google.com... 74.125.227.72, 74.125.227.73, 74.125.227.78, ...
Connecting to docs.google.com|74.125.227.72|:443... connected.
ERROR: cannot verify docs.google.com's certificate, issued by `/C=US/O=Google In
c/CN=Google Internet Authority':
  Unable to locally verify the issuer's authority.
To connect to docs.google.com insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.
'single' is not recognized as an internal or external command,
operable program or batch file.
'gid' is not recognized as an internal or external command,
operable program or batch file.
'range' is not recognized as an internal or external command,
operable program or batch file.
'output' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
4

1 回答 1

0

我不了解 Windows,但是 wget 的 unix 版本有一个名为 no-check-certificate 的标志,可以在这种情况下使用。

于 2013-01-25T23:21:45.570 回答