YoutubeDownloader icon indicating copy to clipboard operation
YoutubeDownloader copied to clipboard

Avoid "undefined index" errors

Open voveson opened this issue 6 years ago • 1 comments

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.

voveson avatar Nov 19 '18 19:11 voveson

Fixes #55.

voveson avatar Nov 19 '18 19:11 voveson