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-dl -F 'video url' crashed unable to extract uploader_id while yt-dlp is working fine #32582

Closed
4 of 6 tasks
pmo-19 opened this issue Oct 5, 2023 · 7 comments · Fixed by #32638
Closed
4 of 6 tasks

Comments

@pmo-19
Copy link

pmo-19 commented Oct 5, 2023

Checklist

  • I'm reporting a broken site support issue
  • 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 bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

$ youtube-dl -v -F 'https://youtu.be/AUAEBjlROWQ'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-F', 'https://youtu.be/AUAEBjlROWQ']
[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.12 (CPython) - Linux-6.2.0-32-generic-x86_64-with-glibc2.35
[debug] exe versions: ffmpeg 4.4.2, ffprobe 4.4.2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] AUAEBjlROWQ: Downloading webpage
[youtube] AUAEBjlROWQ: Downloading API JSON
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/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3/dist-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3/dist-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/lib/python3/dist-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.
$ 

Description

WRITE DESCRIPTION HERE

@winexe0
Copy link

winexe0 commented Oct 5, 2023

I fixed it by running

pip install --upgrade --force-reinstall "git+https://github.com/ytdl-org/youtube-dl.git"

As I installed youtube-dl via pip

@pmo-19
Copy link
Author

pmo-19 commented Oct 5, 2023

OK. Trouble is I installed only the package version and didn't intall with pip within Ubuntu Jammy 22.04.

My prior Ubuntu Focal 20.04 was using the pip install. Now I would like to uninstall the pip version which is messing the package version I believe ? However I don't know how to remove the pip installed version ...

@winexe0
Copy link

winexe0 commented Oct 5, 2023

Just a

pip remove youtube-dl

@pmo-19
Copy link
Author

pmo-19 commented Oct 5, 2023

$ sudo pip uninstall youtube-dl
Found existing installation: youtube-dl 2021.12.17
Not uninstalling youtube-dl at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'youtube-dl'. No files were found to uninstall.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
$

pip remove doesn't exist as a command.

But it looks like there is no pip installed youtube-dl as the python file(s) are part of the Debian package.

@dirkf
Copy link
Contributor

dirkf commented Oct 6, 2023

Read and follow #30839 !

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@pmo-19
Copy link
Author

pmo-19 commented Oct 6, 2023

OK. Great. I managed to build a working package from the nightly build 2023.09.25.

It works, however with 2 WARNINGS :

[youtube] AUAEBjlROWQ: Downloading API JSON
WARNING: unable to extract player URL; 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.
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (expected string or bytes-like object Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1679, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1644, in _extract_n_function
player_id = self._extract_player_info(player_url)
File "/usr/lib/python3/dist-packages/youtube_dl/extractor/youtube.py", line 1476, in _extract_player_info
id_m = re.search(player_re, player_url)
File "/usr/lib/python3.10/re.py", line 200, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
)
[youtube] AUAEBjlROWQ: Downloading API JSON
[...]

As well according to Debian, yt-dlp is more up-to-date, and I can see more details on each format available for download.

@dirkf
Copy link
Contributor

dirkf commented Oct 6, 2023

You've found issue #32499, which isn't yet fixed in the latest code here.

Debian is great but isn't a full source of information in this case. Packaged versions of yt-dl and yt-dlp can fail to keep up with the churn of target websites.

yt-dlp has more people working on it but wants you to have Python 3.8+ (or an OS that will run Python 3.8). That project acquires any good work that's done here and vice versa, depending on effort available.

Generally, if you like yt-dlp and your platform supports it, it will work well for you and probably be updated more quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants