Skip to content

Instantly share code, notes, and snippets.

@Iwwww
Last active May 8, 2023 21:22
Show Gist options
  • Save Iwwww/2407c1f683a32fa89e88e4c2f9e93b8f to your computer and use it in GitHub Desktop.
Save Iwwww/2407c1f683a32fa89e88e4c2f9e93b8f to your computer and use it in GitHub Desktop.
#!/bin/env python3
# Download one file or folder
# from Google Drive using gdown (https://pypi.org/project/gdown)
# REQUIREMENTS:
# pip install gdown
import gdown
url = str(input("url: "))
if "folder" in url:
print("This is a folder")
print("================")
gdown.download_folder(url, use_cookies=False)
print("========================")
print("Downloaded to 'autoload'")
else:
print("This is single file")
print("===================")
output_file = str(input("output filename: "))
gdown.download(url, output=output_file)
print("===================")
print(f"Downloaded to '{output_file}'")
print()
print("Mission Completed!")
print("=================")
print("*congradulations*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment