OP 08 July, 2023 - 02:00 PM
(This post was last modified: 09 July, 2023 - 09:06 AM by johyncharles78666. Edited 2 times in total.)
from pytube import YouTube
import os
import platform
def get_downloads_folder():
system = platform.system()
if system == 'Windows':
return os.path.join(os.path.expanduser("~"), "Downloads")
elif system == 'Darwin':
return os.path.join(os.path.expanduser("~"), "Downloads")
elif system == 'Linux':
return os.path.join(os.path.expanduser("~"), "Downloads")
else:
return None
print("WELCOME TO PYTHON VIDEO DOWNLOADER")
print("AUTHOR JOHYNCHARLES")
URL=input("PLEASE ENTER THE URL OF THE VIDEO: \n")
os.system('cls')
yt=YouTube(URL)
print("...............PLEASE VERIFY THE DETAILS OF THE VIDEO YOU WANT TO DOWNLOAD....................")
print("TITLE:",yt.title)
print("PUBLISH DATE:",yt.publish_date)
print("AGE RESTRICTION:",yt.age_restricted)
print("VIEWS:",yt.views)
print("CHOOSE FROM ONE OF THE OPTION BELOW:")
print("1:DOWNLOAD MP3")
print("2:DOWNLOAD MP4")
choice=int(input())
os.system('cls')
if choice==1:
print(1)
if yt.age_restricted:
yt.bypass_age_gate()
print("DOWNLOADING AUDIO OF",yt.title)
yt.streams.get_audio_only().download(get_downloads_folder())
print("DOWNLOADED SUCCESSFULLY")
if choice==2:
print("CHOOSE")
print("1:LOW QUALITY")
print("2:HIGH QUALITY")
choice1=int(input())
if choice1==1:
if yt.age_restricted:
yt.bypass_age_gate()
print("DOWNLOADING LOW QUALITY VIDEO OF",yt.title)
yt.streams.get_lowest_resolution().download()
print("DOWNLOADED SUCCUESSFULLY")
if choice1==2:
if yt.age_restricted:
yt.bypass_age_gate()
print("DOWNLOADING HIGH QUALITY VIDEO OF",yt.title)
yt.streams.get_highest_resolution().download(get_downloads_folder())
print("DOWNLOADED SUCCESSFULLY")
This is a bump
import os
import platform
def get_downloads_folder():
system = platform.system()
if system == 'Windows':
return os.path.join(os.path.expanduser("~"), "Downloads")
elif system == 'Darwin':
return os.path.join(os.path.expanduser("~"), "Downloads")
elif system == 'Linux':
return os.path.join(os.path.expanduser("~"), "Downloads")
else:
return None
print("WELCOME TO PYTHON VIDEO DOWNLOADER")
print("AUTHOR JOHYNCHARLES")
URL=input("PLEASE ENTER THE URL OF THE VIDEO: \n")
os.system('cls')
yt=YouTube(URL)
print("...............PLEASE VERIFY THE DETAILS OF THE VIDEO YOU WANT TO DOWNLOAD....................")
print("TITLE:",yt.title)
print("PUBLISH DATE:",yt.publish_date)
print("AGE RESTRICTION:",yt.age_restricted)
print("VIEWS:",yt.views)
print("CHOOSE FROM ONE OF THE OPTION BELOW:")
print("1:DOWNLOAD MP3")
print("2:DOWNLOAD MP4")
choice=int(input())
os.system('cls')
if choice==1:
print(1)
if yt.age_restricted:
yt.bypass_age_gate()
print("DOWNLOADING AUDIO OF",yt.title)
yt.streams.get_audio_only().download(get_downloads_folder())
print("DOWNLOADED SUCCESSFULLY")
if choice==2:
print("CHOOSE")
print("1:LOW QUALITY")
print("2:HIGH QUALITY")
choice1=int(input())
if choice1==1:
if yt.age_restricted:
yt.bypass_age_gate()
print("DOWNLOADING LOW QUALITY VIDEO OF",yt.title)
yt.streams.get_lowest_resolution().download()
print("DOWNLOADED SUCCUESSFULLY")
if choice1==2:
if yt.age_restricted:
yt.bypass_age_gate()
print("DOWNLOADING HIGH QUALITY VIDEO OF",yt.title)
yt.streams.get_highest_resolution().download(get_downloads_folder())
print("DOWNLOADED SUCCESSFULLY")
This is a bump