Traceback (most recent call last):
File "D:\WORK\pythonfile\PythonFinal\T1\venv\lib\site-packages\pytube\__main__.py", line 181, in fmt_streams
extract.apply_signature(stream_manifest, self.vid_info, self.js)
File "D:\WORK\pythonfile\PythonFinal\T1\venv\lib\site-packages\pytube\extract.py", line 409, in apply_signature
cipher = Cipher(js=js)
File "D:\WORK\pythonfile\PythonFinal\T1\venv\lib\site-packages\pytube\cipher.py", line 33, in __init__
raise RegexMatchError(
pytube.exceptions.RegexMatchError: __init__: could not find match for ^\w+\W
解决方法:
进入cipher.py文件把第30行替换为
var_regex = re.compile(r"^\$*\w+\W")