Created
September 10, 2023 18:27
-
-
Save NataliaItani/7e0d2b2372c63c91e9acbb8520045412 to your computer and use it in GitHub Desktop.
Youtube Downloader
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
import pytube | |
def download_video(url, save_path): | |
try: | |
# Create a YouTube object | |
yt = pytube.YouTube(url) | |
# Get the highest resolution stream | |
stream = yt.streams.get_highest_resolution() | |
# Download the video | |
stream.download(output_path=save_path) | |
print("Download completed successfully.") | |
except Exception as e: | |
print(f"An error occurred: {e}") | |
if __name__ == "__main__": | |
video_url = input("Enter the YouTube video URL: ") | |
save_location = input("Enter the directory to save the video: ") | |
download_video(video_url, save_location) |
Thanks for the amazing list out. I really need it now. I liked this. If you are interested in look at our reliable blog
Thanks for the amazing list out. I really need it now. I liked this. If you are interested in look at our reliable blog
Welcome
Woow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is the free YouTube downloader scripts that works with the pytube. Now, it is Youtube mp3 downloader for android and desktops.