jdepoix / youtube-transcript-api

This is a python API which allows you to get the transcript/subtitles for a given YouTube video. It also works for automatically generated subtitles and it does not require an API key nor a headless browser, like other selenium based solutions do!
MIT License
2.54k stars 279 forks source link

Bug in _transcripts.py line 37 raise YouTubeRequestFailed(error, video_id) #270

Closed tbelfort closed 2 months ago

tbelfort commented 3 months ago

I deleted, because it's not relevant. I just spotted this while reading the code. :-)

The code in _errors.py is

class YouTubeRequestFailed(CouldNotRetrieveTranscript): CAUSE_MESSAGE = 'Request to YouTube failed: {reason}'

def init(self, video_id, http_error): self.reason = str(http_error) super(YouTubeRequestFailed, self).init(video_id)

Ie, video_id, http_error, but it's called with YouTubeRequestsFailed(error, video_id)

jdepoix commented 3 months ago

Hi @tbelfort, Could you please elaborate what you think the issue is here, I don't think I completely understand 🤔 super(YouTubeRequestFailed, self).__init__(video_id) is a call to the parent constructor of CouldNotRetrieveTranscript, which seems fine to me?

jdepoix commented 2 months ago

closed due to inactivity