Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions pytube_YoutubeDownload.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import os
from pytube import YouTube

dirct = input("Please put the directory here: ")
print(os.getcwd())

if os.getcwd() != dirct:
download_Dir = r"C:\Users\admin\Downloads"

os.chdir(dirct)
# dirct = input("Please put the directory here: ")

if os.getcwd() != download_Dir:

os.chdir(download_Dir)
print(os.getcwd())

urlLink = input("Please paste your URL link here: ")

y = YouTube(urlLink)

adapt = y.streams.filter(adaptive=True)
print(adapt)
# print(adapt)

dwn = y.streams.get_highest_resolution()


dwn.download()

print(f"{dwn.title} download successfully and completed")