简介:所以我正在尝试制作一个 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)