Bash 如何解决wget google docs重定向的问题

Bash 如何解决wget google docs重定向的问题,bash,wget,google-docs,Bash,Wget,Google Docs,需要你的帮助,我遇到了一个问题,我无法使用谷歌文档中的文档。在我列出的日志中,一个文件是正常下载的,比如xlsx,另一个文件在重定向后,以另一种我无法使用的格式发送给我。我使用wget下载,我认为重定向存在一些问题,因为当我尝试通过浏览器下载时,它工作正常。你有什么建议吗 --2020-11-19 00:52:39-- https://docs.google.com/spreadsheets/d/e/2PACX-1vSq821D8kmbYBKoyf2Ozv5RBBjJFWMXw7LrUIPPm

需要你的帮助,我遇到了一个问题,我无法使用谷歌文档中的文档。在我列出的日志中,一个文件是正常下载的,比如xlsx,另一个文件在重定向后,以另一种我无法使用的格式发送给我。我使用wget下载,我认为重定向存在一些问题,因为当我尝试通过浏览器下载时,它工作正常。你有什么建议吗

--2020-11-19 00:52:39--  https://docs.google.com/spreadsheets/d/e/2PACX-1vSq821D8kmbYBKoyf2Ozv5RBBjJFWMXw7LrUIPPmNmTF9in1Csdp2fG7SPF79o9SwJnCYQTYAdRlz6N/pub?output=xlsx&ndplr=1
Resolving docs.google.com (docs.google.com)... 173.194.73.194
Connecting to docs.google.com (docs.google.com)|173.194.73.194|:443... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://doc-0s-b4-sheets.googleusercontent.com/pub/l5l039s6ni5uumqbsj9o11lmdc/8mqrbr7h1trmomb4rrg5q3us94/1605736355000/109767831902272150959/*/e@2PACX-1vSq821D8kmbYBKoyf2Ozv5RBBjJFWMXw7LrUIPPmNmTF9in1Csdp2fG7SPF79o9SwJnCYQTYAdRlz6N?output=xlsx&ndplr=1 [following]
Warning: wildcards not supported in HTTP.
--2020-11-19 00:52:40--  https://doc-0s-b4-sheets.googleusercontent.com/pub/l5l039s6ni5uumqbsj9o11lmdc/8mqrbr7h1trmomb4rrg5q3us94/1605736355000/109767831902272150959/*/e@2PACX-1vSq821D8kmbYBKoyf2Ozv5RBBjJFWMXw7LrUIPPmNmTF9in1Csdp2fG7SPF79o9SwJnCYQTYAdRlz6N?output=xlsx&ndplr=1
Resolving doc-0s-b4-sheets.googleusercontent.com (doc-0s-b4-sheets.googleusercontent.com)... 64.233.162.132
Connecting to doc-0s-b4-sheets.googleusercontent.com (doc-0s-b4-sheets.googleusercontent.com)|64.233.162.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/vnd.openxmlformats-officedocument.spreadsheetml.sheet]
Saving to: ‘/Users/a.trofimenko/Documents/ToolsForShop/SavedFilesFromMail/FoxgamerPrices/ArozziGlasses.xlsx’

/Users/a.trofimenko/Documents/ToolsForShop/SavedFiles     [ <=>                                                                                                                      ]   8,37K  --.-KB/s    in 0,006s  

2020-11-19 00:52:40 (1,29 MB/s) - ‘/Users/a.trofimenko/Documents/ToolsForShop/SavedFilesFromMail/FoxgamerPrices/ArozziGlasses.xlsx’ saved [8575]

--2020-11-19 00:52:40--  https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?output=xlsx&ndplr=1
Resolving docs.google.com (docs.google.com)... 173.194.73.194
Connecting to docs.google.com (docs.google.com)|173.194.73.194|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?output%3Dxlsx%26ndplr%3D1&followup=https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?output%3Dxlsx%26ndplr%3D1&ltmpl=sheets [following]
--2020-11-19 00:52:40--  https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?output%3Dxlsx%26ndplr%3D1&followup=https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?output%3Dxlsx%26ndplr%3D1&ltmpl=sheets
Resolving accounts.google.com (accounts.google.com)... 108.177.14.84
Connecting to accounts.google.com (accounts.google.com)|108.177.14.84|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/Users/a.trofimenko/Documents/ToolsForShop/SavedFilesFromMail/FoxgamerPrices/AKRacingChairs.xlsx’

/Users/a.trofimenko/Documents/ToolsForShop/SavedFiles     [ <=>                                                                                                                      ]  62,03K  --.-KB/s    in 0,04s   

2020-11-19 00:52:41 (1,38 MB/s) - ‘/Users/a.trofimenko/Documents/ToolsForShop/SavedFilesFromMail/FoxgamerPrices/AKRacingChairs.xlsx’ saved [63521]
--2020-11-19 00:52:39--https://docs.google.com/spreadsheets/d/e/2PACX-1vSq821D8kmbYBKoyf2Ozv5RBBjJFWMXw7LrUIPPmNmTF9in1Csdp2fG7SPF79o9SwJnCYQTYAdRlz6N/pub?output=xlsx&ndplr=1
正在解析docs.google.com(docs.google.com)。。。173.194.73.194
连接到docs.google.com(docs.google.com)| 173.194.73.194 |:443。。。有联系的。
HTTP请求已发送,正在等待响应。。。307临时重定向
地点:https://doc-0s-b4-sheets.googleusercontent.com/pub/l5l039s6ni5uumqbsj9o11lmdc/8mqrbr7h1trmomb4rrg5q3us94/1605736355000/109767831902272150959/*/e@2PACX-1VSQ821D8KMBYBKOYF2OZV5RBBJJFWMXW7LRUIPPMNMTF9INCSDP2FG7SPF79O9SWJNCYQTYADRLZ6N?输出=xlsx&ndplr=1[如下]
警告:HTTP中不支持通配符。
--2020-11-19 00:52:40--  https://doc-0s-b4-sheets.googleusercontent.com/pub/l5l039s6ni5uumqbsj9o11lmdc/8mqrbr7h1trmomb4rrg5q3us94/1605736355000/109767831902272150959/*/e@2PACX-1VSQ821D8KMBYBKOYF2OZV5RBBJJFWMXW7LRUIPPMNMTF9INCSDP2FG7SPF79O9SWJNCYQTYADRLZ6N?输出=xlsx&ndplr=1
解析doc-0s-b4-sheets.googleusercontent.com(doc-0s-b4-sheets.googleusercontent.com)。。。64.233.162.132
连接到doc-0s-b4-sheets.googleusercontent.com(doc-0s-b4-sheets.googleusercontent.com)| 64.233.162.132 |:443。。。有联系的。
HTTP请求已发送,正在等待响应。。。200行
长度:未指定[application/vnd.openxmlformats of icedocument.spreadsheetml.sheet]
保存到:'/Users/a.trofimenko/Documents/ToolsForShop/SavedFilesFromMail/FoxgamerPrices/ArozziGlasses.xlsx'
/Users/a.trofimenko/Documents/ToolsForShop/SavedFiles[]8,37K--.-KB/s英寸0006s
2020-11-19 00:52:40(1,29 MB/s)-“/Users/a.trofimenko/Documents/ToolsForShop/savedfilesfromail/FoxgamerPrices/ArozziGlasses.xlsx”已保存[8575]
--2020-11-19 00:52:40--  https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?output=xlsx&ndplr=1
正在解析docs.google.com(docs.google.com)。。。173.194.73.194
连接到docs.google.com(docs.google.com)| 173.194.73.194 |:443。。。有联系的。
HTTP请求已发送,正在等待响应。。。302临时搬家
地点:https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/e/2PACX-1VQoEW0BM6CXXSGZLSZCCIB7CW5KASDQGOGY1FVIEWNKLABWIAXPECO0UO76JN3M5PBKJ56T9/pub?输出%3Dxlsx%26ndplr%3D1和后续=https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?输出%3Dxlsx%26ndplr%3D1<mpl=工作表[如下]
--2020-11-19 00:52:40--  https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/e/2PACX-1VQoEW0BM6CXXSGZLSZCCIB7CW5KASDQGOGY1FVIEWNKLABWIAXPECO0UO76JN3M5PBKJ56T9/pub?输出%3Dxlsx%26ndplr%3D1和后续=https://docs.google.com/spreadsheets/d/e/2PACX-1vQoEw0Bm6CxxsGzlSZCCiB7Cw5kAsCYPerddQGOGy1fvIE1WnklabWIAxPeCO0UO76Jn3m5PbKj56t9/pub?输出%3Dxlsx%26ndplr%3D1<mpl=张
解析accounts.google.com(accounts.google.com)。。。108.177.14.84
连接到accounts.google.com(accounts.google.com)| 108.177.14.84 |:443。。。有联系的。
HTTP请求已发送,正在等待响应。。。200行
长度:未指定[text/html]
保存到:'/Users/a.trofimenko/Documents/ToolsForShop/SavedFilesFromMail/FoxgamerPrices/AKRacingChairs.xlsx'
/Users/a.trofimenko/Documents/ToolsForShop/SavedFiles[]62,03K--.-KB/s在0,04s中
2020-11-19 00:52:41(1,38 MB/s)-“/Users/a.trofimenko/Documents/ToolsForShop/savedfilesfromail/FoxgamerPrices/AKRacingChairs.xlsx”已保存[63521]

请共享您正在尝试执行的命令use@Alessandro它只是wget“https://$VALUE”--输出文档=“$PWD/FoxgamerPrices/$KEY.xlsx”其中的值类似于:docs.google.com/spreadsheets/d/e/2PACX-1vRTODOmG41UHNiEQ37zx_j4s7cin9upstsr6mbcwatmp72tpeue29lv-dxdvurroPQCgxqAS6_Wsa/pub?output=xlsx&ndplr=1您尝试访问的第二个链接不是公共的。如果没有正确的身份验证,您将无法下载。@Alessandro是的,谢谢,我知道这一点,但它是有效的,但现在我更改了gmail帐户的密码,我想问题在于此。但有些文件下载成功,我不明白为什么。为了能够在未经授权的情况下下载文件,它必须是公开的。您可以通过浏览器下载,因为您已登录。您能否检查成功下载的其余文件是否已公开共享?这些文件应该是公开的还是私有的?谢谢D