gpt4 book ai didi

python - pytube-Youtube 函数未初始化

转载 作者:行者123 更新时间:2023-12-01 08:41:25 25 4
gpt4 key购买 nike

我安装了pytube,运行它时出现错误(我使用的是python 3.7),问题似乎出在pytube本身,我我正在使用该模块的教程的确切代码。

import pytube

link ='https://www.youtube.com/watch?v=9bZkp7q19f0'
yt = pytube.YouTube(link)
stream = yt.streams.first()
finished = stream.download()
print('Download is complete')


Traceback (most recent call last):
File "C:\automate the boring stuff\youtubetry.py", line 6, in <module>
yt = pytube.YouTube(link)
File "C:\Users\diodi\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pytube\__main__.py", line 88, in __init__
self.prefetch_init()


[Finished in 6.0s with exit code 1]

最佳答案

我上周遇到了这个问题。因为我使用的是 Ubuntu,所以对我有用的是导航到:

/home/<username>/anaconda3/lib/python3.6/site-packages/pytube

并添加

r'\bc\s*&&\s*d\.set\([^,]+,.*?\((?P<sig>[a-zA-Z0-9$]+)\(\(0\s*,\s*window.decodeURIComponent'

cipher.py 中的 get_initial_function_name() 函数中的模式列表。该错误在 this Github thread 中有进一步讨论。 .

关于python - pytube-Youtube 函数未初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53472840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com