When we download/upload something from a cloud server, it gives more transfer rate as compared to a normal server. We can use Google Drive for storage as well as fast speed download. The problem is how to upload something to G-Drive direct from Internet. So, Here we will see a solution to upload anything to Google drive directly from Internet.
All we need is google account and a few lines of code.
Google Colab is a free cloud service with GPU support. It is like Jupyter Notebook and very simple to use. In this tutorial, we will be using Google Colab to download anything to our google drive.
Step #1 : Sign in to Google Colab and Create a new Python3 notebook.
Step #2 : Importing google drive to colab
To import google drive, write this code in code section of colab and run it by
On running code, one blue link and a text box will appear we need to provide a permission text. So click the link and a new tab will open where you will be asked for permission to access google drive. After providing permissions a text will be displayed that we need to Copy and paste on colabs text box.
Paste text in box and press enter. That all to import gdrive. We can see google drive on Left side Panel.
Step #3 : Download something to Google Drive
To download something all we need is URL to downloadable file.
Run this code to download the files in gdrive (Change the file_url with your file’s url).
We can see on the left side panel that pdf file is downloaded.
We can use google colab to download any file on google drive. As you can see a folder parrot (parrot OS of 3.7 GB ), downloaded to gdrive using Colab.
- How to use Google Colab
- Ways to import CSV files in Google Colab
- How to download Google Images using Python
- YouTube Media/Audio Download using Python | pafy
- Python | Download YouTube videos using youtube_dl module
- Download Instagram profile pic using Python
- Uploading files on Google Drive using Python
- Simple Multithreaded Download Manager in Python
- Pytube | Python library to download youtube videos
- Python | Program to download complete Youtube playlist
- Python | How to download windows lock-screen wallpapers
- How to download and install Python Latest Version on Windows
- Download and Install Python 3 Latest Version
- How to download and install Python Latest Version on Android
- How to download and install Python Latest Version on macOS / Mac OS X
- How to download and install Python Latest Version on Linux
- Download and install pip Latest Version
- Tableau Drivers - Download and Connect
- Raise a File Download Dialog Box in Python
- Pafy - Canceling Active Download Stream
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : nidhi_biet