Youtube_dl : ERROR : YouTube said: Unable to extract video data

前端 未结 4 2206
别跟我提以往
别跟我提以往 2021-01-17 08:41

I\'m making a little graphic interface with Python 3 which should download a youtube video with it URL. I use for that the module youtube_dl. This is my code :



        
4条回答
  •  悲&欢浪女
    2021-01-17 09:43

    You could try adding a cookie file as some videos are age restricted. Use this plugin Chrome plugin Cookie.txt to download your cookies in a txt file then use these --cookies /path/to/cookies/file.txt flags not forgetting to put the right path to the file of your cookies.txt.

    Sample:

    youtube-dl -n --cookies ~/Downloads/cookies.txt https://www.youtube.com/watch\?v\=h7Ii7KKapig
    

    Surce

提交回复
热议问题