Scripts to download files and folders programmatically from Google Drive

Overview

Google Drive Downloader Scripts

Every time I need to download a lot of files from Google Drive (e.g. a dataset), it's always incredibly frustrating and slow to get that done. The browser UI very often fails mysteriously and when it does work, it is slow. So here are two scripts to download a file and download a folder programmatically, in case they are more broadly useful.

Prereqs

You would need to do the prerequisites here and in particular Create credentials. The scripts expect you to put the OAuth file you create as client_secret.json in the same folder as the script (obviously you can change this in the script). I also needed to pip install oauth2client in addition to the 3 libraries they list, so e.g.

pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib oauth2client

Running

Run them with the --noauth_local_webserver option, e.g. python3 download_folder.py --noauth_local_webserver This will spit out a link and then pause and wait for input. Copy and paste the link to a browser where you are logged in to a Google account with access to the folder. It will give you a prompt to authorize the app/project/whatever it's called thing you created when creating your credentials. After you allow it (as best as I can tell this is one time and not a permanent permission), it will give you a code that you can copy and paste as a response to the script.

Both scripts prompt you for a file id/folder id on the command line. You can find these in the URL from the web UI, e.g https://drive.google.com/drive/folders/

Outputs

Obviously, feel free to change where the scripts write but the download_file.py one spits out the file in the same folder as the script and download_folder.py spits them out in a downloaded/ subfolder (but it does not create it).

Misc

Some of this code was originally given in the Python Google Drive API Quickstart That code is available in a Google repo and it carries an Apache license. It is also useful to refer to the docs for the functions

Similar Tools

I also heard there are two other tools that get this job done. They are probably more bug-free and better maintained, so here they are:

Owner
Ivan Evtimov
University of Washington Allen School of CSE PhD student. Lafayette College Computer Science alum.
Ivan Evtimov
YouTube Video publisher using youtube-dl & ROS2🐒

YouTube-publisher-ROS2 Publish sensor_msgs/Image by "YouTube" πŸ€— πŸ€— πŸ€— ! You don't have to use webcamera or your video to check demos. Purpose Quick d

Ar-Ray 5 Dec 04, 2022
An Inline Telegram bot that can download YouTube videos with permanent thumbnail support

Tube (YouTube Downloader) An Inline Telegram bot that can download YouTube videos with permanent thumbnail support About Bot need to be in Inline Mode

Renjith Mangal 30 Dec 14, 2022
A scriptable music downloader for Qobuz, Tidal, and Deezer

streamrip A scriptable stream downloader for Qobuz, Tidal, and Deezer. Features Downloads tracks, albums, playlists, discographies, and labels from Qo

967 Jan 03, 2023
ImageScraper is a cross-platform tool for downloading a specified count from xkcd, Astronomy Picture of the Day and Existential Comics

ImageScraper The ImageScraper is a cross-platform tool for downloading a specified count from xkcd, Astronomy Picture of the Day and Existential Comic

1amnobody 1 Jan 25, 2022
Python script to automate youtube-dl downloads

Automated Download Tool !! Project status I am writing a new version of this program, which will solve several errors. The new version only supports G

Devil64-Dev 21 Sep 22, 2022
Python script to download all images/webms of a 4chan thread

Python3 script to continuously download all images/webms of multiple 4chan thread simultaneously - without installation

Micha Fink 208 Jan 04, 2023
Download India Stocks Historical Data

Kite Helper - Download Stock Market Data 🌎 Website Simple Application to Download any stock market data in .csv format using Kite πŸƒβ€β™‚οΈ Running Serve

Pishang Ujeniya 12 Dec 06, 2022
New York Times Front Page Downloader.

TIMETRAVELER New York Times Front Page Downloader. Usage python3 timetraveler.py All data will be saved at ~/timetraveler/ Goals To keep a historica

Daeshon Jones 0 Oct 31, 2021
Tool To download - Amazon - Netflix- Disney+ - VideoLand - Boomerang - RTE.ie

vinetrimmer Widevine Decryption Script for Python Modules Amazon Netflix (with [email protected]

9 Dec 31, 2021
a simple ehentai downloader with jpg 2 pdf

Simple_Ehentai_DownLoader a simple ehentai downloader with jpg 2 pdf 中文介绍 Environment python3.8 How to use before you start,there are some tips. the q

Hibian 6 Dec 11, 2022
Youtube Downloader is a Graphic User Interface(GUI) that lets users download a Youtube Video or Audio through a URL

Youtube Downloader This Python and Tkinter based GUI allows users to directly download the Best Resolution Videos and Audios from Youtube. Pa-fy Insta

Samarth Kumar 2 Jun 25, 2022
Python module to download all media from a GoFile gallery.

GoFile Downloader Setup First of all, clone this repository : ~$ git clone https://github.com/quatrecentquatre-404/gofile-downloader Second, oh wait..

Quatrecentquatre 61 Jan 01, 2023
Newsemble is an API that provides easy access to the current news for programmatic analysis

Newsemble is an API that provides easy access to the current news for programmatic analysis. It has been built using Python, BeautifulSoup and MongoDB.

Rishabh 43 Dec 16, 2022
Download Apple Music Cover Artwork in the best Quality by providing an Apple Music Link. It downloads the jpg, png and webp version since they often differ from another.

amogus.py - Version 0.0.5 amogus - Apple Music Hi-Res Artwork Fetcher this is my first real python tool so sorry if its bad amogus is a Python script

reaper 46 Jan 09, 2023
Music, Album and Playlist downloader for JioSaavn

jiosaavn-dl Music, Album and Playlist downloader for JioSaavn Features Downloads tracks, albums and playlists in maximum available quality (320kbps AA

bunny 19 Dec 12, 2022
YouTube to MP3 or 4, you get to choose...

UTubeToMP YouTube to MP3 or 4, you get to choose... If you don't wanna git clone andor dont wanna install python. Here: Repl.it Instructions: Pretty s

1 Jan 29, 2022
music downloader written in python. (Uses jiosaavn API)

music downloader written in python. (Uses jiosaavn API)

Rohn Chatterjee 35 Jul 20, 2022
Ripurei is a free-to-use osu! replay downloader, that can be configured to download from any osu! server.

Ripurei Ripurei is a fully functional osu! replay downloader, fully capable of downloading from almost any osu! server. Functionality Timeline βœ”οΈ Able

Thomas 0 Feb 11, 2022
This is a python based web scraping bot for windows to download all ACCEPTED submissions of any user on Codeforces

CODEFORCES DOWNLOADER This is a python based web scraping bot for windows to download all ACCEPTED submissions of any user on Codeforces Requirements

Mohak 6 Dec 29, 2022
Python script for downloading audio from YouTube songs/videos.

Python script for downloading audio from YouTube songs/videos. All you have to do is specify the path to your folder and then type song's/video's name and the sound will be downloaded into your folde

Mateusz Polis 0 Oct 05, 2022