Open masikh opened 4 years ago
When trying to initialize a non existing YouTube link I get a key error which is not catched by the pytube3 library. I have to catch it in my own code which I think is dirty.
example:
def init_yt(self): try: self.yt_link = YouTube('https://www.youtube.com/watch?v={yt_key}'.format(yt_key=self.yt_key)) except Exception as error: print('caught error: {error}'.format(error=error))
if I don't do the try/except it will crash on a 'streamingData' key error.
Kind regards,
Robert
When trying to initialize a non existing YouTube link I get a key error which is not catched by the pytube3 library. I have to catch it in my own code which I think is dirty.
example:
def init_yt(self): try: self.yt_link = YouTube('https://www.youtube.com/watch?v={yt_key}'.format(yt_key=self.yt_key)) except Exception as error: print('caught error: {error}'.format(error=error))
if I don't do the try/except it will crash on a 'streamingData' key error.
Kind regards,
Robert