YoutubeDownloader
YoutubeDownloader copied to clipboard
Avoid "undefined index" errors
I recently had an exception thrown with the following message:
Undefined index: view_count
This led me to realize that the script assumes the existence of several indices. While this is the first time the error has presented, and I think it's likely that these indices exist the majority of the time, I thought it worthwhile to add some checks so that the script can continue in the absence of any of these indices, rather than erroring out. Therefore, this PR simply adds checks to ensure that the indices exist before attempting to access them.
Fixes #55.