MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
July
Sun Mon Tue Wed Thu Fri Sat
 
17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
2024
Months
JulAug Sep
Oct Nov Dec


Mon, May 29, 2023 9:09 pm

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:

  1. ERROR: Unable to extract uploader id #32247
    By: jgmayer
    Date: May 29, 2023
    Github - ytdl-org / youtube-dl

Related Articles:

  1. Python script to download YouTube videos on Mac OS X

[/video/youtube] permanent link

Sun, May 24, 2020 1:37 pm

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

Sat, Nov 26, 2016 10:35 pm

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

Sat, Mar 31, 2007 3:15 pm

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

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo