2012-11-20 62 views
0

我正在編寫批處理腳本.. 將使用wget從Google文檔下載。來自Google文檔的wget上的SSL證書錯誤

我收到谷歌公司的SSL錯誤。

這裏是代碼的wget(此鏈接Windows batch file file download from a 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的

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 . . . 
+0

嘗試通過自己創建wget語句,無需腳本,首先消除任何腳本錯誤並專注於證書錯誤,然後發佈代碼和結果 – Lizz

回答

0

SSL錯誤,我不知道Windows,但wget的的UNIX版本有在這種情況下可以使用被稱爲no-check-certificate的標誌。