I'm using pytube to convert a url that is for sure a link to a YouTube playlist into a pytube.Playlist()
if "/playlist?list=" in url:
playlist = Playlist(url)
if len(playlist.video_urls._elements) == 0:
print("Some error message")
The problem is that the playlist I'm using to test this has about 300 videos in it, so this if
statement should be skipped, but instead, it goes into it and prints the error message. So naturally, I went to check it out with the debugger, and for some reason, once I start stepping into the code, it works the way it should and skips the if
statement.
Anyone know what might be the problem?
IDE: Visual Studio Code
OS: Windows 10