tuandunghcmut's picture
Add files using upload-large-folder tool
7d9e5ac verified
raw
history blame
446 Bytes
import gdown
def download_colab_notebook(url, output_path):
# Extract the file ID from the URL
file_id = url.split('/d/')[1].split('?')[0]
download_url = f"https://drive.google.com/uc?id={file_id}"
# Download the file
gdown.download(download_url, output_path, quiet=False)
# Example usage
download_colab_notebook('https://colab.research.google.com/drive/1T5-zKWM_5OD21QHwXHiV9ixTRR7k3iB9?usp=sharing', 'notebook.ipynb')