Youtube is one of the world’s biggest streaming platforms but lacks some features in its free variation. The ability to download videos is something that just about every Youtube viewer wants; luckily, there are hundreds of free tools to do that. However, some might not work as well as others.
Python developers using the yt_dlp library have recently been impacted by a bug where their previously functional codebases for downloading videos fail because of the “unable to extract uploader id” error. In this article, we’re discussing what causes the error and how to fix the issue.
Also read:Â Open video downloader error binaries missing/corrupted: Quick Fix
What causes the unable to extract uploader ID error?
The main reason the error occurs is that the library cannot parse the video URL provided correctly, which results in a missing uploader ID, something that’s required to query the Youtube database to find the specific video to download. The bug seems to have appeared in a new release.Â
Also read: When does Spotify wrapped come out?
How to fix the unable to extract uploader ID error?
Here are two fixes you can try out.
Reinstall the library
You must reinstall the library from the main Github branch using the following command to fix the issue.Â
python3 -m pip install --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
You can import it correctly once you download and install the library.
import yt_dlp as youtube_dl
Alternatively, you can also try downloading a patched version of the library using this command.
python3 -m pip install yt-dlp==2023.02.17.334
Check uploader ID parsing
Alternatively, you can also write the uploader ID differently so that the @ handle is captured properly. Since this is written in regex, it can be tricky to get the parsing right. You can use the following line to add the uploader ID properly.
'uploader_id': self._search_regex(r'/(?:channel/|user/|(?=@))([^/?&#]+)', owner_profile_url, 'uploader id', default=None),
Also read: 10 best YouTube downloaders and converters
Hi Yad. changed line 1794 of /usr/local/lib/python3.10/site-packages/youtube_dl/extractor/youtube.py with your suggestion and it worked and solved the issue “youtube_dl.utils.RegexNotFoundError: Unable to extract uploader id” . Many thanks. G.
Thanks Gulu! Happy to help.