YouTube DL不返回艺术家和曲目

问题描述

我正在尝试提取艺术家信息并从YouTube视频中进行跟踪,但是youtube-dl库未针对歌曲和艺术家返回任何信息。

我了解到YouTube最近已更新,youtube-dl尚未赶上更新。

还有其他方法可以做到吗?


        # takes in a video url and extracts all the info about it
        youtube_url = f"https://www.youtube.com/watch?v={video_id}"


        # we dont want all the logs and unnecessay stuff and we dont want the library to download the video,so...
        video = youtube_dl.YoutubedL({'quiet': True}).extract_info(
           youtube_url,download=False
        )

        # Now that we have the info we need,lets assign it to the variables artist,track

        artist = video['artist']
        track = video['track']
        print("song:",track)
        print("artist:",artist)
        return artist,track

输出为:

song: None
artist: None

解决方法

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

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

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