Skip to content

Instantly share code, notes, and snippets.

View hxhcreate's full-sized avatar
🎯
Focusing

Xuhao Hu hxhcreate

🎯
Focusing
  • Fudan Univ | BIT
  • Shanghai, China
View GitHub Profile
import os, re, sys, time
import requests
import gdown
# Solve the limit of 50 on the maximum number of files downloaded in single folder on Google Drive. You can use this script to recursively download a folder, including all the files and subfolders on Google Drive.
# based on https://gist.github.com/DaniDipp/744b52adb341e41fdf871346a59e442c. thanks to @DaniDipp
def recursive_gdown(folder_id, current_path=''):
url = f"https://drive.google.com/embeddedfolderview?id={folder_id}"
response = requests.get(url)