Downloading YouTube videos on a Windows system with yt-dlp
YouTube recently
changed its website (around January 4, 2026) so that programs that worked in
the past for downloading YouTube videos, such as
StreamFab,
no longer work. My wife and I like to archive YouTube videos we find that
have useful information we might wish to refer to again in the future,
since we've sometimes found that when we try to view them again on
YouTube that a channel where they were posted has disappeared along with
all its videos. We have a YouTube premium subscription, which allows
one to download videos, but they are stored in a blob file where they
are not accessible to programs we use to view videos and there is no
guarantee they will remain accessible even in YouTube's limited offline
viewing method when a channel disappears. So we were very perturbed that
YouTube has now made it very difficult to archive videos. StreamFab has been
working very well for my wife and is easy to use, but I needed to look
for an alternative for her. A couple of sites that still work that
allow one to download YouTube videos are listed below, but downloading
through those websites is slower and she found that for fairly large
videos the downloads would fail.
https://ytdown.to/en2/
https://v6.www-y2mate.com/
Since I had WinPython, a
free and
open-source version of the
Python programming language installed on a Windows laptop and she is
using a Windows 11 system at the moment, though she wants to switch to
Linux, I decided to try
the yt-dlp
Python program that allows one to download YouTube videos from a
command-line
interface (CLI).
[ More Info ]
[/video/youtube]
permanent link
youtube-dl unable to extract uploader id
I installed
ytdl-org /
youtube-dl from
Github
to download videos from
YouTube to a
Linux
system with the
pip package manager, since youtube-dl is a
Python
script, using the command
pip3 install youtube-dl. But when I
tried to download a YouTube video with youtube-dl, I received an error message
indicating the script was unable to extract the ID of the uploader of the
video and the video was not downloaded.
$ youtube-dl https://www.youtube.com/watch?v=JmSmjDngVXM
[youtube] JmSmjDngVXM: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
$
I verified I had the latest version of the program, 2021.12.17.
$ youtube-dl --version
2021.12.17
$
To obtain further information on the error, I then ran the script with the
--verbose option which showed me more details on the error.
$ youtube-dl --verbose https://www.youtube.com/watch?v=JmSmjDngVXM
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=JmSmjDngVXM']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.6.8 (CPython) - Linux-3.10.0-229.7.2.el7.x86_64-x86_64-with-centos-7.1.1503-Core
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] JmSmjDngVXM: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
ie_result = ie.extract(url)
File "/usr/local/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 534, in extract
ie_result = self._real_extract(url)
File "/usr/local/lib/python3.6/site-packages/youtube_dl/extractor/youtube.py", line 1794, in _real_extract
'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
File "/usr/local/lib/python3.6/site-packages/youtube_dl/extractor/common.py", line 1012, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
$
The software, which is a command-line program to download videos from
YouTube.com and other video sites, is maintained by
ytdl-org and, on a Github webpage
for the organization, I found issue #32247,
ERROR: Unable to extract uploader id, which attributed the error to
YouTube recently starting to add that "at sign", i.e., @, to URLs. jgmayer,
who posted his comments and the solution just 3 hours before I encountered
the problem, posted the following solution:
The solution is to go to the file that you getting the error:
"/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py"
Find the following line:
'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
Replace with the following:
'uploader_id': self._search_regex(r'/(?:channel/|user/|@)([^/?&#]+)', owner_profile_url, 'uploader id', default=None),
The poster indicated the relevant file is
/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py,
but there is no /usr/local/Cellar directory on my system and
running the script with the verbose option, showed the relevant code is on line
1,794 of
/usr/local/lib/python3.6/site-packages/youtube_dl/extractor/youtube.py.
After making the suggested change, I was able to download a YouTube video
with the program.
$ youtube-dl https://www.youtube.com/watch?v=JmSmjDngVXM
[youtube] JmSmjDngVXM: Downloading webpage
[download] Destination: Ancient Greek Lesson #1 _ Learn Greek Fast Online-JmSmjDngVXM.mp4
[download] 100% of 14.88MiB in 04:20
$
The updated youtube.py that can
be used to replace the 2021.12.17 version in
/usr/local/lib/python3.6/site-packages/youtube_dl/extractor/youtube.py.
References:
-
ERROR: Unable to extract uploader id #32247
By: jgmayer
Date: May 29, 2023
Github - ytdl-org / youtube-dl
Related Articles:
-
Python script to download YouTube videos
on Mac OS X
[/video/youtube]
permanent link
Saving a YouTube Video transcript to a text file
When watching YouTube video lectures, I often wish to save the dialog
to a text file that I can search. You can obtain a text transcript of
the audio for a YouTube video lecture by clicking on the three dots to
the right of "Share", which will give you the option to "Open transcript."
When you choose that option, you will then see a transcript displayed
to the right of the video. But when you copy that text to a text editor,
you may see the dialog on separate lines from the accompanying
timestamps. You can put each line of dialog on the same line as its
timestamp using the regular expression
1,$ s/\(:\d\d\)\n/\1 /
within the vi or vim text editors.
[ More Info ]
[/video/youtube]
permanent link
Python script to download YouTube videos on Mac OS X
If you wish to download a
YouTube video to store locally on your computer,
you can do so on a
Mac OS X system, and
Linux systems, also, using
youtuble-dl, a
Python script. You can also download a
Microsoft Windows exe file from the
youtube-dl Download
Page. With youtube-dl, you can download videos from YouTube and other
sites from a
command-line interface (CLI).
For a Mac OS X system, you can obtain the script using the
curl utility that is provided
with the operating system. You can also use curl on a Linux system, if you
have it installed on that system. Alternatively, you can use
wget, which isn't
provided with the OS X system, but which you may have on a Linux system, if
you don't have curl available. To obtain the youtube-dl script using curl on
a Mac OS X system, you can open a
Terminal
window and issue the command sudo curl -L
https://yt-dl.org/downloads/latest/youtube-dl -o
/usr/local/bin/youtube-dl. That will download the script and place it in
the /usr/local/bin directory.
[ More Info ]
[/video/youtube]
permanent link
Saving YouTube Videos
YouTube doesn't offer a way for you
to easily download videos from the site, but there are other webssites where
you can paste the URL of the video you wish to download and then download
it from those sites.
[ More Info ]
[/video/youtube]
permanent link