yt-dlp: [Youtube] `Unable to extract uploader id`

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2023.01.06 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

This error started appearing to me yesterday and almost every video gave this error, but I could download the video after about 3 attempts. But today, all youtube videos are giving this error no matter how many times I try to download it. Can anyone help me?

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=aqz-KE-bpKQ']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd25] (zip)
[debug] Python 3.9.4 (CPython x86_64 64bit) - Linux-5.15.10-tinycore64-x86_64-with-glibc2.34 (OpenSSL 1.1.1j  16 Feb 2021, glibc 2.34)
[debug] exe versions: ffmpeg 4.4 (setts), ffprobe 4.4, phantomjs 2.1.1
[debug] Optional libraries: mutagen-1.46.0, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[youtube] Extracting URL: https://www.youtube.com/watch?v=aqz-KE-bpKQ
[youtube] aqz-KE-bpKQ: Downloading webpage
[youtube] aqz-KE-bpKQ: Downloading android player API JSON
[debug] Loading youtube-nsig.1cbba2b4 from cache
WARNING: [youtube] aqz-KE-bpKQ: Native nsig extraction failed: Trying with PhantomJS
         n = __Fxna8S9BSt6Xk ; player = https://www.youtube.com/s/player/1cbba2b4/player_ias.vflset/en_US/base.js
[debug] [youtube] Signature function returned an exception; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] aqz-KE-bpKQ: Executing signature code
[debug] [youtube] PhantomJS command line: phantomjs --ssl-protocol=any /tmp/tmpbp71rh8v
[debug] [youtube] Decrypted nsig __Fxna8S9BSt6Xk => kUALy39FPpkyJw
ERROR: [youtube] aqz-KE-bpKQ: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py", line 680, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 4049, 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/bin/yt-dlp/yt_dlp/extractor/common.py", line 1228, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 52
  • Comments: 54 (6 by maintainers)

Commits related to this issue

Most upvoted comments

This bit? "ownerProfileUrl":"http://www.youtube.com/@pbsspacetime"

Yep that’s the one, thanks. I had a feeling the new @handle URL was to blame.

I think this should fix the issue

diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py
index 95ca52b3a..4dde4bbaa 100644
--- a/yt_dlp/extractor/youtube.py
+++ b/yt_dlp/extractor/youtube.py
@@ -4120,7 +4120,7 @@ def is_bad_format(fmt):
             'thumbnail': traverse_obj(original_thumbnails, (-1, 'url')),
             'description': video_description,
             'uploader': get_first(video_details, 'author'),
-            'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
+            'uploader_id': self._search_regex(r'/(?:channel/|user/|(?=@))([^/?&#]+)', owner_profile_url, 'uploader id', default=None),
             'uploader_url': owner_profile_url,
             'channel_id': channel_id,
             'channel_url': format_field(channel_id, None, 'https://www.youtube.com/channel/%s'),

EDIT: updated regex so that @ will be captured as part of the uploader_id

Latest yt-dlp 2023.02.16.19419 doesn’t solve this, right?

Yes. The build was run before the fix is done in master Going to be working in 2023.02.17.xxx. The build will run in 7 hours

For regular release users: We’re going to have a new release soon™️ to address this issue

Next time something like this happens, I’ll probably lock the repo using GH moderation tools. It’s not something I want to do, but dealing with so many duplicates is such a pain

How does one download the patch?

the next version (2023.02.17) of https://github.com/ytdl-patched/yt-dlp should be out in approximitely one hour. Either use that, or wait for the next yt-dlp release, which will come out soon, according to Lesmiscore’s message

EDIT: for PIP users, this will also work (thanks @richardwalenga):

python3 -m pip install -U pip setuptools wheel
python3 -m pip install --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz

Having the same issue here, also Brazil.

The issue started around 7 AM (GMT-3), all my auto-download scripts stopped working at that time. Seems to be related to how channels now use a “@customchannelname” instead of the old “/channel/channel_ID”

Tried it with over 100 different videos, none of them download, so it’s not specific to any channel or video.

Great work! I can imagine it’s very stressful having something break and users pile in with the same issue repeatedly. Bravo to a well-functioning team! 👏

How does one download the patch?

Is there a way to be notified when this fix lands?

Go to"watch" and clic the arrow then clic custom then clic releases

The patch seems to work. 🏆

I have the same issue (germany,1&1 ISP), so it’s likely not a issue limited to one location

EDIT: for PIP users, this will also work (thanks @richardwalenga):

python3 -m pip install --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
checkbox-ng 1.4.0 requires pycrypto>=2.6.1, which is not installed.
whatstk 0.5.0 requires certifi==2020.12.5, but you have certifi 2022.12.7 which is incompatible.
whatstk 0.5.0 requires numpy~=1.19.1, but you have numpy 1.21.6 which is incompatible.

@krasnh How come?

Sorry. I was wrong. ) It was necessary to run it locally, ./yt-dlp 'aqz-KE-bpKQ'. I ran it like this yt-dlp 'aqz-KE-bpKQ'.

The commit https://github.com/yt-dlp/yt-dlp/commit/149eb0bbf34fa8fdf8d1e2aa28e17479d099e26b is working. Confirm.

WIndows 10. Where do I put de patch? I use standalone yt-dlp.exe

You cannot apply the text diff into a binary for obvious reasons.

Edit: keep an eye on https://github.com/ytdl-patched/yt-dlp/releases for new daily releases from the master branch.

I think this should fix the issue

Yes it does!

It does not work for me.

>yt-dlp --no-config -v --get-title 2ZACWIPuTDE
[debug] Command-line config: ['--no-config', '-v', '--get-title', '2ZACWIPuTDE']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd25] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-80522-ge0faad8 (needs_adtstoasc), ffprobe N-80522-ge0faad8
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[youtube] Extracting URL: 2ZACWIPuTDE
[youtube] 2ZACWIPuTDE: Downloading webpage
[youtube] 2ZACWIPuTDE: Downloading android player API JSON
ERROR: [youtube] 2ZACWIPuTDE: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 680, in extract
  File "yt_dlp\extractor\youtube.py", line 4049, in _real_extract
  File "yt_dlp\extractor\common.py", line 1228, in `_search_regex

The patch from @bashonly fixed the issue. Thank you - now Jouwbuis is up and running again!

yt-dlp -vU --write-pages --print-traffic https://www.youtube.com/watch?v=aqz-KE-bpKQ works for me:

grep -Po 'ownerProfileUrl":"\K([^"]*)"' 'aqz-KE-bpKQ_https_-_www.youtube.com_watchv=aqz-KE-bpKQ_bpctr=9999999999_has_verified=1.dump'
http://www.youtube.com/user/BlenderFoundation"

However yt-dlp -vU --write-pages https://www.youtube.com/watch?v=LqYBa1xCLRM does NOT work fo me:

[debug] Command-line config: ['-vU', '--write-pages', 'https://www.youtube.com/watch?v=LqYBa1xCLRM']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd2508]
[debug] Lazy loading extractors is disabled
[debug] Python 3.11.1 (CPython x86_64 64bit) - Linux-6.1.11-200.fc37.x86_64-x86_64-with-glibc2.36 (OpenSSL 3.0.8 7 Feb 2023, glibc 2.36)
[debug] exe versions: ffmpeg 5.1.2 (setts), ffprobe 5.1.2
[debug] Optional libraries: Cryptodome-3.17.0, brotli-1.0.9, certifi-2021.10.08, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[youtube] Extracting URL: https://www.youtube.com/watch?v=LqYBa1xCLRM
[youtube] LqYBa1xCLRM: Downloading webpage
[youtube] Saving request to LqYBa1xCLRM_https_-_www.youtube.com_watchv=LqYBa1xCLRM_bpctr=9999999999_has_verified=1.dump
[youtube] LqYBa1xCLRM: Downloading android player API JSON
[youtube] Saving request to LqYBa1xCLRM_https_-_www.youtube.com_youtubei_v1_playerkey=AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w_prettyPrint=false.dump
[debug] Loading youtube-nsig.1cbba2b4 from cache
WARNING: [youtube] LqYBa1xCLRM: nsig extraction failed: You may experience throttling for some formats
         Install PhantomJS to workaround the issue. Please download it from https://phantomjs.org/download.html
         n = 8IY4WqK_fBKTDUL ; player = https://www.youtube.com/s/player/1cbba2b4/player_ias.vflset/en_US/base.js
[debug] [youtube] Signature function returned an exception; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
ERROR: [youtube] LqYBa1xCLRM: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 680, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/youtube.py", line 4049, in _real_extract
    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1228, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)

grep -Po 'ownerProfileUrl":"\K([^"]*)"' LqYBa1xCLRM_https_-_www.youtube.com_watchv\=LqYBa1xCLRM_bpctr\=9999999999_has_verified\=1.dump 
http://www.youtube.com/@orthosporteschweiler3469"