📌  相关文章
📜  使用 api python 代码示例下载 youtube 视频

📅  最后修改于: 2022-03-11 14:46:42.694000             🧑  作者: Mango

代码示例1
#download pytube with pip install pytube
import pytube

#made it a function so that you can call it from any script and just pass in
#the url in ""
def downloadVideo(url):
    youtube = pytube.YouTube(url)
    video = youtube.streams.get_highest_resolution()
    print(video.title)
    video.download()