看板 R_Language 關於我們 聯絡資訊
[問題類型]: 程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來) [軟體熟悉度]: 開發者(有撰寫R 的套件經驗) [問題敘述]: 我想從google drive 下載 netcdf 的檔案 https://drive.google.com/drive/folders/1rKRqEoo24sKcRRy5o67Su6SjNV1CV49d 但是會出現 Content type 'text/html; charset=utf-8' length unknown downloaded 3294 bytes 檔案沒有正常下載 我試過 其他檔案都正常 (txt/csv) [程式範例]: [環境敘述]: > sessionInfo() R version 3.4.3 (2017-11-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 [關鍵字]: -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 149.168.204.10 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1550505138.A.B17.html
celestialgod: https://i.imgur.com/Z64MxvT.png 02/19 14:08
celestialgod: linux測試正常 02/19 14:08
celestialgod: Method換一個試試看 02/19 14:47
andrew43: win10 R 3.5.2 64bit 也都正常 02/19 16:57
dreler1: 我發現應是擋在 google drive download anyway 這邊 02/20 00:38
dreler1: 請問你們下下來大小是142MB嗎? 02/20 00:40
dreler1: 我用這個去改 http://0rz.tw/ZBZkd 02/20 00:41
dreler1: href="/uc?export=download&confirm 拿這一整串 還是不行 02/20 00:41
dreler1: 換了method 還是不行 最後用其他方法把檔案轉到local做了 02/20 00:42
andrew43: 沒留意檔案大小。看來celestialgod和我都只取到3306 B 02/20 10:16
Wush978: 用googledrive套件呢? 02/21 00:29
dreler1: googledrive可以下 但是這樣沒辦法下別人分享的東西 02/22 04:48
Wush978: 會嗎? 不能下載別人分享的東西,是不是權限設定出錯呢? 02/22 23:14
這個地方我不太確定我有沒有理解錯 因為之前都沒用googledrive 大概看了document 自己弄得 library(googledrive) drive_find(n_max = 50) 會跟我要google API 我當然只有我自己的API 所以我不太確定要怎麼下載別人的東西 裡面有提到 You can expect to be sent to your browser here, to authenticate yourself and authorize the googledrive package to deal on your behalf with Google Drive. drive_download("538-star-wars-survey") 我現在是用這樣下載 可以完整下載 因為數據是 某個政府機構轄下的google drive 還是googledrive 可以用 id下載 我沒看到這個function 謝謝啦 ※ 編輯: dreler1 (149.168.204.10), 02/22/2019 23:58:08 ※ 編輯: dreler1 (149.168.204.10), 03/25/2019 21:08:56