So I have a for loop with a lot of YouTube links, and I want to download them in that loop. There is an error that says 'Unavailable Video' when I do this:
for post in hot_posts:
yt = YouTube(post.url)
yt.download()
So let me explain this code, I'm using PRAW to get hot posts from Reddit, and I want to download them in a for loop. hot_posts is a variable for 25 hot posts and post.url is the url of the post.
When I remove the for loop and put a link in the YouTube() part, it works perfectly. I've also tried str(post.url) to make sure it's a string.
How does this work in a for loop???