【发布时间】:2022-01-01 08:29:33
【问题描述】:
我昨天在使用 pytube,它运行时没有任何问题。但是今天突然停止了,我在尝试获取视频流时遇到了这个错误。我尝试卸载并使用不同的版本再次安装它,但没有任何变化。
如何解决?
Traceback (most recent call last): File "<stdin>", line 1, in
<module File
"C:\Users\2021\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py",
line 292, in streams
return StreamQuery(self.fmt_streams) File "C:\Users\2021\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py",
line 177, in fmt_streams
extract.apply_signature(stream_manifest, self.vid_info, self.js) File
"C:\Users\2021\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\extract.py",
line 409, in apply_signature
cipher = Cipher(js=js) File "C:\Users\2021\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py",
line 44, in __init__
self.throttling_array = get_throttling_function_array(js) File "C:\Users\2021\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py",
line 323, in get_throttling_function_array
str_array = throttling_array_split(array_raw) File "C:\Users\2021\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\parser.py",
line 158, in throttling_array_split
match_start, match_end = match.span() AttributeError: 'NoneType' object has no attribute 'span'
【问题讨论】: