Skip to content

Instantly share code, notes, and snippets.

@KaushikShresth07
Created June 12, 2021 13:36
Show Gist options
  • Save KaushikShresth07/c7af7641775ef6e85892d4ac7899ea8f to your computer and use it in GitHub Desktop.
Save KaushikShresth07/c7af7641775ef6e85892d4ac7899ea8f to your computer and use it in GitHub Desktop.
from pytube import YouTube
from pyautogui import click
from pyautogui import hotkey
import pyperclip
from time import sleep
def DownloadYouTube(PathToSave):
sleep(2)
click(x=942,y=59)
hotkey('ctrl','c')
value = pyperclip.paste()
Link = str(value)
def Download(link):
url = YouTube(link)
video = url.streams.first()
video.download(PathToSave)
Download(Link)
@TanmayProgrammer
Copy link

That's truly appreciable. That actually helped me a lot

Thanks.

@Arnav324
Copy link

Incredable, remember me I am Arnav

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment