utils.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:docker-compose-tor-demo 作者: rwestergren 项目源码 文件源码
def get_video_info(url):
    """
    Retrieve the YouTube videos' information without downloading it.

    Source: http://stackoverflow.com/questions/18054500/how-to-use-youtube-dl-\
            from-a-python-programm/18947879#18947879
    """
    ydl = youtube_dl.YoutubeDL()
    ydl.add_default_info_extractors()

    try:
        return ydl.extract_info(url, download=False)
    except youtube_dl.DownloadError:
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号