-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Captions aren't being displayed since the timedtext api returns zero length 200 status code for caption requests.
This also affect subtitle download feature of this web app, which got exception because the watch/transcript route doesn't handle zero length response gracefully.
Traceback (most recent call last):
File "/tmp/youtube-local/src/venv/lib/python3.11/site-packages/flask/app.py", line 1511, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/youtube-local/src/venv/lib/python3.11/site-packages/flask/app.py", line 919, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/youtube-local/src/venv/lib/python3.11/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/youtube-local/src/venv/lib/python3.11/site-packages/flask/app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/youtube-local/new_src/youtube/watch.py", line 829, in get_transcript
while lines[i] != '':
~~~~~^^^
IndexError: list index out of range
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels