Last active
May 8, 2023 21:22
-
-
Save Iwwww/2407c1f683a32fa89e88e4c2f9e93b8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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