Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YouTube] Unable to extract uploader id #31530

Open
5 tasks done
Shituation opened this issue Feb 16, 2023 · 619 comments · Fixed by #31675
Open
5 tasks done

[YouTube] Unable to extract uploader id #31530

Shituation opened this issue Feb 16, 2023 · 619 comments · Fixed by #31675
Labels
broken-IE problem with existing site extraction fixed

Comments

@Shituation
Copy link

Shituation commented Feb 16, 2023

This issue is solved: read the Description below
If you still want to comment after reading that, think again: first read this post below to avoid your comment being deleted or marked as spam.

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.12.17
  • I've checked that all provided URLs are alive and playable in a browser
  • 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

Verbose log

[YouTube] Unable to extract uploader id
yt-dlp.exe" -x -4 --download-archive "C:\Youtube-dlp\download_history.txt" --external-downloader aria2c --restrict-filenames --match-filter "description*='ESTRENO'" --audio-format mp3 -o "E:\FOLDER\RENAME\%%(title)s.%%(ext)s" "https://www.youtube.com/watch?v=lcusH7ksCNw&list=PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3&index=67" -v
[debug] Command-line config: ['-x', '-4', '--download-archive', 'C:\\Youtube-dlp\\download_history.txt', '--external-downloader', 'aria2c', '--restrict-filenames', '--match-filter', "description*='ESTRENO'", '--audio-format', 'mp3', '-o', 'E:\\A.PROCESAR\\RENAME\\%%(title)s.%%(ext)s', 'https://www.youtube.com/watch?v=lcusH7ksCNw&list=PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3&index=67', '-v']
[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-109541-g94aa70d757-20230109 (setts), ffprobe N-109541-g94aa70d757-20230109, phantomjs 2.1.1
[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
[debug] Loading archive file 'C:\\Youtube-dlp\\ download_history.txt'
[youtube:tab] Extracting URL: https://www.youtube.com/watch?v=lcusH7ksCNw&list=PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3&index=67
[youtube:tab] Downloading playlist PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3 - add --no-playlist to download just the video lcusH7ksCNw
[youtube:tab] PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3: Downloading webpage
[youtube:tab] Extracting URL: https://www.youtube.com/playlist?list=PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3
[youtube:tab] PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3: Downloading webpage
[youtube:tab] PLuXU-g7mjkKPvWSFq7xI_N4Xj7A3iSOU3: Redownloading playlist API JSON with unavailable videos
[download] Downloading playlist: LA VENGANZA SERÁ TERRIBLE (Programas)
[youtube:tab] Playlist LA VENGANZA SERÁ TERRIBLE (Programas): Downloading 67 items of 67
[download] Downloading item 1 of 67
[youtube] Extracting URL: https://www.youtube.com/watch?v=3h5-QPbKoVg
[youtube] 3h5-QPbKoVg: Downloading webpage
[youtube] 3h5-QPbKoVg: Downloading android player API JSON
[debug] Loading youtube-nsig.1cbba2b4 from cache
WARNING: [youtube] 3h5-QPbKoVg: Native nsig extraction failed: Trying with PhantomJS
         n = GDZ_5inyZ3r6QSP ; 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] 3h5-QPbKoVg: Executing signature code
[debug] [youtube] PhantomJS command line: phantomjs "--ssl-protocol=any" "C:\Users\USER\AppData\Local\Temp\tmp88untizd"
[debug] [youtube] Decrypted nsig GDZ_5inyZ3r6QSP => ECvndyupC0ex4A
ERROR: [youtube] 3h5-QPbKoVg: 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

Description

[Revised by @dirkf]
OP actually reported the bug for yt-dlp.

The problem, which was revealed by a change in the metadata served by YouTube, applied to both youtube-dl and yt-dlp and has been fixed in both programs.

There is a release of yt-dlp that includes the fix. See #31535 for discussion of whether this would be a good choice for you.

See below for ways to update to a fixed version of youtube-dl. Using -U doesn't (yet) work. A new release may be created, including the final fix, some time later than now. However, there is now a nightly build from the latest code here.

There's no point posting your log that shows the error now: feel free to thumb-up this post. Also, be aware that the initial patch still flagged the original issue as a WARNING; the fully fixed yt-dl doesn't. Consider raising a separate issue if your fixed yt-dl shows a different error.

@christianKuntz

This comment was marked as off-topic.

@LucasAlmeida0

This comment was marked as duplicate.

@dmelladoc
Copy link

I'm having the same issue here. Using youtube-dl version 2021.12.17

It seems that youtube might have changed something internally.

youtube-dl --verbose https://www.youtube.com/watch\?v\=y6_TOFy3k6k
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=y6_TOFy3k6k']
[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.10.9 (CPython) - Linux-6.1.12-zen1-1-zen-x86_64-with-glibc2.37
[debug] exe versions: ffmpeg 5.1.2, ffprobe 5.1.2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] y6_TOFy3k6k: 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; type  youtube-dl -U  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/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/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/bin/youtube-dl/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; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@Shituation

This comment was marked as outdated.

@nicolaasjan

This comment was marked as resolved.

@SoundsBetter

This comment was marked as outdated.

@nicolaasjan

This comment was marked as outdated.

@Shituation

This comment was marked as resolved.

@dirkf

This comment was marked as outdated.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
@christianKuntz

This comment was marked as outdated.

@dirkf

This comment was marked as outdated.

@bashonly
Copy link
Contributor

bashonly commented Feb 16, 2023

@dirkf
It seems to be some sort of regional(?) A/B-testing. I wasn't able to reproduce the issue at first either, but I was able to confirm the change in site behavior through affected users' page dumps. Youtube has begun serving web JSON where the ownerProfileUrl value is the @handle URL format instead of /channel/ or /user/, and this breaks the fatal _search_regex() used to extract uploader_id

@Delitants

This comment was marked as duplicate.

@nPHYN1T3

This comment was marked as outdated.

@Vangelis66

This comment was marked as outdated.

@dirkf
Copy link
Contributor

dirkf commented Feb 17, 2023

In any case the extraction of an optional field shouldn't crash the extraction:

-            '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', fatal=False) if owner_profile_url else None,

[Update] To quote @nicolaasjan:

That's not the real fix.
It was fixed with the merging of pull request #31675 two weeks ago.

Exactly. Don't apply this change. Use the suggested methods as linked from the Description, which you should read again if you were thinking of applying this change.

@dirkf dirkf reopened this Feb 17, 2023
@huzzam

This comment was marked as duplicate.

@Vangelis66

This comment was marked as outdated.

@Vangelis66

This comment was marked as outdated.

@dirkf

This comment was marked as outdated.

@vdegenne

This comment was marked as off-topic.

@nicolaasjan

This comment was marked as off-topic.

@dirkf

This comment was marked as off-topic.

@fazliimam

This comment was marked as spam.

@php4fan

This comment was marked as spam.

@idoodler

This comment was marked as spam.

@n-sweep

This comment was marked as spam.

@relunctance

This comment was marked as spam.

@badjano

This comment was marked as spam.

@dirkf

This comment was marked as resolved.

@Elmehdioub

This comment was marked as spam.

@vodiylik

This comment was marked as spam.

@jayaBalaR

This comment was marked as duplicate.

@jayaBalaR

This comment was marked as duplicate.

@dirkf

This comment was marked as resolved.

@snex

This comment was marked as spam.

@paulrougieux

This comment was marked as resolved.

@dirkf

This comment was marked as resolved.

@jgspratt

This comment was marked as spam.

@calvinusesyourcode

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broken-IE problem with existing site extraction fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.