小编Sci*_*veo的帖子

pytube.exceptions.RegexMatchError: get_throttling_function_name: 找不到多个匹配项

我曾经通过以下方式下载歌曲:

from pytube import YouTube
video = YouTube('https://www.youtube.com/watch?v=AWXvSBHB210')
video.streams.get_by_itag(251).download()
Run Code Online (Sandbox Code Playgroud)

从今天开始出现这个错误:

回溯(最近一次调用):文件“C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube_ main _.py”,第 170 行,在 fmt_streams extract.apply_signature(stream_manifest , self.vid_info, self.js) 文件 "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\extract.py", line 409, in apply_signature cipher = Cipher( js=js) 文件 "C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py", line 43, in init self.throttling_plan = get_throttling_plan(js) 文件“C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py”,第 387 行,在 get_throttling_plan raw_code = get_throttling_function_code(js ) 文件“C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py”,第 293 行,get_throttling_function_code name = re.escape(get_throttling_function_name(js)) 文件“C:\Users\Me\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\cipher.py”,第 278 行,在 get_throttling_function_name 中引发 RegexMatchError( pytube.exceptions.RegexMatchError: get_throttling_function_name: 找不到匹配多个

在处理上述异常的过程中,又发生了一个异常:

回溯(最近一次通话):文件“C:\Users\Me\Documents\YouTubeDownloader.py”,第 3 行,在 video.streams.get_by_itag(251).download() 文件“C:\Users\Me\AppData \Local\Programs\Python\Python39\lib\site-packages\pytube_ main _.py”,第 285 行,在流中返回 StreamQuery(self.fmt_streams) 文件“C:\Users\Me\AppData\Local\Programs\Python \Python39\lib\site-packages\pytube_ main _.py”,第 177 行,在 …

python-3.x pytube

2
推荐指数
4
解决办法
686
查看次数

标签 统计

python-3.x ×1

pytube ×1