小编Dim*_*184的帖子

如何使 pytube 打印所有可用分辨率并用户输入一个

简介:所以我正在尝试制作一个 pytube 项目,但我陷入了这一步,

问题:我不知道如何让 pytube 列出所有可用的分辨率


from pytube import YouTube

# import the package
print("Please Paste The URL of the youtube video")
url = input()
# URL (user input)
my_video = YouTube(url)
print(my_video.title)
# Title of The Video

#Now for the Thumbnail Image
print("Thumbnail URL")
print(my_video.thumbnail_url)

#To Download the video with the users Choice of resolution

print("Choose A Resolution Please")
for stream in my_video.stream:
    print(stream)
#command for downloading the video
my_video.download()
Run Code Online (Sandbox Code Playgroud)

python pytube

3
推荐指数
1
解决办法
3717
查看次数

标签 统计

python ×1

pytube ×1