Force wget para usar o arquivo real do Google Docs

1

Estou programando em lote, não importa, porque estou usando o wget no Windows também.

Eu encontrei uma pergunta semelhante neste site Force wget para usar o nome do arquivo real primeira solução funciona para todos, mas porque não funciona para mim? Estou recebendo o seguinte erro.

C:\Users\MYNAME\Documents\TemObv\GnuWin32\bin>wget --content-disposition 'http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE'

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Users\MYNAME\Documents\TemObv\GnuWin32/etc/wgetrc
'http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE': Unsupported scheme.

Atualização:

C:\Users\MYUSER\Documents\TemObv\GnuWin32\bin>wget --content-disposition "http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls"
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Users\MYUSER\Documents\TemObv\GnuWin32/etc/wgetrc
--2012-11-20 15:11:40--  http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls
Resolving spreadsheets.google.com... 74.125.227.102, 74.125.227.103, 74.125.227.104, ...
Connecting to spreadsheets.google.com|74.125.227.102|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls [following]
--2012-11-20 15:11:40--  https://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls
Connecting to spreadsheets.google.com|74.125.227.102|:443... connected.
ERROR: cannot verify spreadsheets.google.com's certificate, issued by '/C=US/O=Google Inc/CN=Google Internet Authority':
  Unable to locally verify the issuer's authority.
To connect to spreadsheets.google.com insecurely, use '--no-check-certificate'.
Unable to establish SSL connection.
    
por Mowgli 20.11.2012 / 21:22

1 resposta

1

Se bem me lembro, você teria que usar aspas duplas (") ao redor do URL ...

wget --content-disposition "http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE"

Se isso redireciona você para https e você não tem os certificados instalados, pode ser necessário emitir o seguinte:

wget --no-check-certificate --content-disposition "http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE"
    
por andrekeller 20.11.2012 / 22:03