Created
March 16, 2024 21:10
-
-
Save cdeitrick/b5ce1dc9b78516694942b79e440023ff to your computer and use it in GitHub Desktop.
Download OneDrive files in terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Google Chrome as well as Mozilla Firerfox both provide an option to copy download link specifically for cURL. This option will generate cURL with all required things such as User agent for downloading things from the side. To get that, | |
| 1. Open the URL in either of the browser. | |
| 2. Open Developer options using Ctrl+Shift+I. | |
| 3. Go to Network tab. | |
| 4. Now click on download. Saving file isn't required. We only need the network activity while browser requests the file from the server. | |
| 5. A new entry will appear which would look like "download.aspx?...". | |
| 6. Right click on that and Copy → Copy as cURL. | |
| 7. Paste the copied content directly in the terminal and append --output file.extension to save the content in file.extension since terminal isn't capable of showing binary data. |
thanks for this! it was super helpful
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I forked and made some minor edits, in case you are interested in incorporating them