How to fix “Youtube said: Unable to extract video data. Youtube-dl” error

The “youtube-dl” is a tool that makes use of Python interpreters and performs the function of downloading videos from YouTube as well as some other websites. Oftentimes using this command,  When used in a code, we can face a very common error which says “Youtube said: Unable to extract video data”. In this article, we will show you a few ways to fix the error caused by possible absence of this tool.

Why does the “Unable to extract video data” problem occur?

In this section, we will list some of the reasons that are invoking the error “Youtube said: Unable to extract video data: Youtube-dl”.

Reason 1: Obsolete version is installed

The version of youtube_dl that you are using is obsolete. Run this command to check and verify it:

$ youtube-dl -version

This should inform you are using an outdated version of youtube-dl or not.

Reason 2: Files are corrupted

If you are using the latest version of youtube-dl and still find yourself with the same error, then it is likely that your files have become corrupted.

Methods to fix the problem “Unable to extract video data”?

Here are a few easy solutions corresponding to the reasons mentioned above, through which you can remove the error.

Solution 1: Update youtube_dl

The first method to fix the error is to update your currently existing youtube-dl. Use the python “pip” keyword to update the “youtube_dl” on your system.

The “pip” keyword requires Python to be installed on your system, if your system doesn not have it installed, run the command below:

$ sudo apt install python3-pip

If Python is present on your system, then proceed.

After installing Python, update your youtube_dl using this command:

$ pip install -U youtube-dl

Updating your youtube_dl should fix the error that you are facing

Solution 2: Reinstall youtube_dl

If the above solution does not work, try to reinstall the youtube_dl by following the below-mentioned steps:

Step 1: Remove the installed version

Run the following command to uninstall youtube_dl:

$ sudo apt remove youtube-dl

Step 2: Install youtube_dl again

Run the following command to install youtube_dl on your system:

$ sudo apt install youtube-dl

Run your program once again and the issue should be resolved once the reinstallation is done.

Conclusion

Updating youtube-dl is perhaps the most efficient way to fix the “unable to extract video data ” error. However, you can also reinstall the youtube-dl utility to fix the error. In this post, we have explained the possible reasons that invoke the error named “Unable to extract video data” and the solutions to these reasons are also demonstrated.