ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.96k stars 10.01k forks source link

After update, unable to extract. RegexNotFoundError on uploader id. OSX Homebrew #32447

Closed dvodvo closed 1 year ago

dvodvo commented 1 year ago

Checklist

ran

brew upgrade youtube-dl youtube-dl --version 2021.12.17

There is a similar issue, but the discussion that follows relates to ITV urls

Verbose log

The address is taken from the control-click menu item choices of the available web page.

youtube-dl https://youtu.be/kemukciHN8M --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://youtu.be/kemukciHN8M', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 2b4cfb033
[debug] Python version 3.10.10 (CPython) - macOS-12.3-arm64-arm-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] kemukciHN8M: Downloading webpage
[youtube] kemukciHN8M: Downloading player 30857836
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 "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/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 "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/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 HTML video tag has:
<video tabindex="-1" class="video-stream html5-main-video" webkit-playsinline="" playsinline="" controlslist="nodownload" style="width: 1090px; height: 354px; left: 0px; top: 0px;" src="blob:https://www.youtube-nocookie.com/75346055-471a-498b-b269-8567239ef6e4"></video>,
but is of no immediate use(to this user at least)

Description

the requested URL does not initiate the download. other attempts with alternative utube domains (seen in the past) have failed (not even finding the file).

The error implies the file exists, but - almost immediately after seeing Downloading webpage hits the error. Thus potentially an issue with the name of the file

jeremy-morren commented 1 year ago

Another example:

youtube-dl --version
2021.12.17
youtube-dl https://www.youtube.com/watch?v=0PkSMVdLGF4 --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=0PkSMVdLGF4', '--verbose']
[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.6 (CPython) - Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
[debug] exe versions: ffmpeg 4.4.2, ffprobe 4.4.2
[debug] Proxy map: {}
[youtube] 0PkSMVdLGF4: Downloading webpage
[youtube] 0PkSMVdLGF4: Downloading MPD manifest
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.
dirkf commented 1 year ago

Your error is Unable to extract uploader id with YouTube. Read #30839 again (?) for the resolution.

dvodvo commented 1 year ago

The downloading was executed after uninstalling and re-installing youtube-dl. (via homebrew on MAC OSX)

brew uninstall youtube-dl
brew install youtube-dl

May I suggest that the error message be adapted.
The notion of update, or as brew required upgrade, is misleading. A fresh install was required.

dvodvo commented 1 year ago

for this reader the matter is closed. Hopefully it can be of use to others.

dirkf commented 1 year ago

From the master issue:

brew install --head ...

The patched version from the brewery is out of date.

See also PR #32445.