The file got downloaded but did not get renamed. It just hung on the last part yesterday when I tried it, but I just tried again and after a while I got this error message: Traceback (most recent call last):įileNotFoundError: The system cannot find the file specified: "Cristobal Tapia de veer - DIRK GENTLY's original score sampler - cut 3.mp4" -> "Cristobal Tapia de veer - DIRK GENTLY's original score sampler - cut 3.mp3" Print(yt.title "\nHas been successfully downloaded.") Video.download(output_path = destination) Print("Enter the destination (leave blank for current directory)") Video = yt.streams.filter(only_audio = True).first() Yt = YouTube(str(input("Enter the URL of the video you want to download: \n> "))) I tried using os.rename() but am unsure how to make it work. I'd like a simple and elegant solution that I can understand, but any help will be appreciated. Well I'm stuck on the last part: changing the extension to. ![]() ![]() As a beginner project I thought I'd make a YouTube downloader using pytube that lets you choose whether to download a video in highest quality or only download the audio from it as a. I'm new to Python, and have only worked with PHP 5 in the past, (many years ago now).
0 Comments
Leave a Reply. |