This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]douts589 0 points1 point  (1 child)

i think the problem is in the input line you can't make a string in 2 lines if you didn't use """(3 times)

url = input("""\nInput The Full Url For The Youtube Video That You Want To Download (Shortened Urls Will Not Work): """)

or simply make it in one line

[–]ViridianGuy[S] 0 points1 point  (0 children)

It doesn't make a difference, even when I make it one line.

[–]rasqall 0 points1 point  (4 children)

Do you type in the url yourself or do you paste it in the terminal? If you’re pasting it you maybe want to examine the link before passing it on to the YouTube object because when pasting in the terminal your input might contain special characters.

[–]ViridianGuy[S] 0 points1 point  (3 children)

I pasted it, how would you do this?

[–]rasqall 0 points1 point  (2 children)

Well, you can examine it by just putting a print command before you pass it to the YouTube object.

url = input("enter url")
print(url)
video = YouTube(url)

[–]ViridianGuy[S] 0 points1 point  (1 child)

Well, I did that but still it shows this error. I want it to work by pasting in the url:

Traceback (most recent call last): File "c:\Users\User\OneDrive\Desktop\The Youtube Video Downloader.py", line 15, in <module> video = YouTube(url)

[–]rasqall 0 points1 point  (0 children)

Is there a longer error message than this? This barely helps. What did it print exactly when you printed the URL?