Open
Description
I'm writing a script to get the captions on youtube.
from pytubefix import YouTube
@service
def ytube():
try:
yt = YouTube('https://www.youtube.com/watch?v=-zXQhqVcKh0')
caption = list(yt.captions)[0]
log.info(f"Found captions: {caption}")
except Exception as e:
log.error(f"Exception: {str(e)}")
And I get an error here:
Exception: Caught blocking call to putrequest with args (<http.client.HTTPSConnection object at 0x7f7a65d760>, 'POST', '/youtubei/v1/player?prettyPrint=false') inside the event loop by custom integration 'pyscript' at custom_components/pyscript/eval.py, line 1571: return getattr(val, arg.attr). (offender: /usr/local/lib/python3.12/http/client.py, line 1347: self.putrequest(method, url, **skips)), please create a bug report at https://github.com/custom-components/pyscript/issues
Could you please help me solve this? Thanks so much
Metadata
Metadata
Assignees
Labels
No labels