Skip to content

"url-to-google-drive" is a Python script for Google Colab that simplifies downloading files from URLs and saving them to Google Drive.

Notifications You must be signed in to change notification settings

mausam-giri/url-to-google-drive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Google Drive Downloader

A Python script to download files from a given URL and save them to Google Drive. "url-to-google-drive" is a Python script for Google Colab that simplifies downloading files from URLs and saving them to Google Drive.

Table of Contents

Installation

This script is designed to be used in a Google Colab environment. You can simply copy and paste the code into a new Colab notebook.

Usage

Mount Google Drive

Use the following code to mount your Google Drive to the Colab notebook:

from google.colab import drive
drive.mount('/content/drive')

Verify the mount by running

ls "/content/drive/My Drive/"

Specify File Path

Specify the file path where you want to save the downloaded file:

data_path = 'datasets'

Provide URL

Provide the URL of the file you want to download:

url = "https://example.com/file.zip"

Call Function

Call the save_to_drive function with the URL and file path:

save_to_drive(url, f"{data_path}/file.zip")

Requirements

  • Google Colab environment
  • tqdm library (installed by default in Colab)

Contributing

Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request.

Author

[@mausam-giri]

About

"url-to-google-drive" is a Python script for Google Colab that simplifies downloading files from URLs and saving them to Google Drive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published