PyTube音频和视频下载程序

问题描述

我对此程序有疑问:

从pytube导入YouTube

while True:
url = YouTube(input("please enter your YouTube LINK : "))
type = YouTube(input("please enter yr type,audio or video : "))
video = url.streams.first().download()
audio = url.streams.filter(only_audio=True).all()
if type == video:
    print(video)
    break
elif type == audio:
    yt_obj[0].download()
    print(audio)

    break
else :
    print("pls enter audio,or,video :")

print("success")
break

我得到此味精: raise RegexMatchError(caller="regex_search",pattern=pattern) pytube.exceptions.RegexMatchError: regex_search: could not find match for (?:v=|\/)([0-9A-Za-z_-]{11}).*

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)