Skip to content

A Python code repository for downloading files from YouTube videos and URLs, with support for progress tracking and Google Drive integration.

License

Notifications You must be signed in to change notification settings

akhi07rx/Youtube-To-Google-Drive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

This README provides an overview and usage instructions for the code included in this repository.

Open In Colab

Introduction

The code in this repository is designed to facilitate the downloading of files from various sources, including YouTube videos and other URLs. It leverages the tqdm, requests, pytube, and os libraries to achieve this functionality.

Prerequisites

To run the code, please ensure that you have the following prerequisites installed:

  • Python 3.x
  • The tqdm, requests, pytube, and os libraries

Setup

  1. Clone the repository to your local machine.
  2. Open the code in a Python editor or IDE.

Usage

  1. Mount your Google Drive by running drive.mount('/content/drive').
  2. Define the destination folder in your Google Drive where the downloaded files will be saved. Modify the destination_folder variable to specify the desired folder path.
  3. If the destination folder doesn't exist, the code will create it automatically.
  4. Use the download_youtube_video() function to download YouTube videos. Pass the YouTube video URL and the destination folder path as arguments to the function.
  5. If the input is not a YouTube link, the code will attempt to download the file from the provided URL. Make sure the URL is accessible and the file exists.
  6. The code will display the file size and progress bar while downloading the file.
  7. Once the file is downloaded, it will be saved in the specified destination folder.
  8. Repeat the process for downloading additional files by entering new URLs or YouTube links.
  9. To exit the program, enter 'exit' when prompted for a download link.

Example

Here is an example usage of the code:

  1. Mount your Google Drive:
drive.mount('/content/drive')
  1. Define the destination folder in your Google Drive:
destination_folder = '/content/drive/MyDrive/DOWNLOADS 02/'
  1. Run the code and follow the prompts to enter a download link or YouTube URL. For example:
Enter the download link (or 'exit' to quit): https://www.youtube.com/watch?v=abcde12345
  1. Monitor the progress bar as the file downloads. Once completed, the file will be saved in the specified destination folder.

Note

  • Ensure that you have a stable internet connection while running the code, especially when downloading large files or streaming YouTube videos.
  • Please be aware of any legal restrictions or copyright issues when downloading files from external sources.

Contributing

Contributions to this repository are welcome. If you find any issues or have suggestions for improvements, please submit a pull request or open an issue.

License

This code is released under the MIT License.

Acknowledgements

About

A Python code repository for downloading files from YouTube videos and URLs, with support for progress tracking and Google Drive integration.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published