Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   1401

Python Video And Audio Downloader Bot Youtube (SOURCE CODE) (PLEASE DROP LIKE)

by johyncharles78666 - 08 July, 2023 - 02:00 PM
This post is by a banned member (johyncharles78666) - Unhide
34
Posts
29
Threads
3 Years of service
#1
(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
This post is by a banned member (UberFuck) - Unhide
UberFuck  
Godlike
1.555
Posts
375
Threads
5 Years of service
#2
__
[Image: hzfY75W.jpg]

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)