0

I need to download a file from onedrive or google drive using wget or a faster method!

I've tried lots of code i could find on the internet but have not had any luck.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Possible duplicate of [Python: download files from google drive using url](https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url) – ItayMiz Aug 30 '19 at 22:14
  • 5
    suggest you show us the code , to proove that you did research on microsoft or google provided api – James Li Aug 30 '19 at 22:14

1 Answers1

1

This has worked for me to download a non-protected-link file:

  1. Go to your OneDrive
  2. Click on the share link and copy. It will look like: https://.../EvZJeK2tIMOs54OA?<other-stuff>
  3. Append download=1 after ? looking like https://.../EvZJeK2tIMOs54OA?download=1

Now you can use it with wget like:

wget https://.../EvZJeK2tIMOs54OA?download=1 -O <output-file-name\>.<extension\>

Note: The -O (capital O) is to define an output name otherwise it will have EvZJeK2tIMOs54OA?download=1 as the file name.