MoonPoint Support Logo

 

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



Advanced Search
May
Sun Mon Tue Wed Thu Fri Sat
 
     
2023
Months
May


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

Mon, May 22, 2023 10:05 pm

Relaying Denied by Sendmail

A family member reported she was no longer able to send email via a Sendmail service I have running on a CentOS Linux system. She sent me a screenshot of the message she received when attempting to send a message. I saw a "Server error: '550 5.7.1 ... Relaying denied'" message. At first, I thought that a technician from her Internet Service Provider (ISP) might have changed her Microsoft Outlook settings when he upgraded her network equipment recently, but then I remembered I was restricting email relaying on the system by IP address and realized her IP address would have changed when the technician upgraded her network equipment. So I had her visit whatismyipaddress.com and provide me with the public IPv4 IP address it showed for her. I then replaced her prior IP address in /etc/mail/access. The format for an entry to allow relaying from a particular IP address is as shown below.

# Jane Doe
192.168.71.77                           RELAY

You can include a comment to indicate who the IP address is associated with by prefixing the comment with a pound sign. The IP address should be followed by the word "RELAY" (you can put tabs in between the IP address and the word, if you like).

After changing the IP address, I rebuilt the access database with the makemap command. I then restarted Sendmail

# makemap hash /etc/mail/access </etc/mail/access
# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
#

I was then able to receive a test message she sent me. After updating the IP address, I may only have needed to restart Sendmail without running the makemap command first as I found the following at 19.3.2. Sendmail on a Red Hat website in reference to running the make all -C /etc/mail/ command (CentOS is derived from Red Hat Enterprise Linux):

All other generated files in /etc/mail (db files) will be regenerated if needed. The old makemap commands are still usable. The make command is automatically used whenever you start or restart the sendmail service.

[/network/email/sendmail] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo