安装python版本
pip install youtube_dl
问题
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.
解决方案
使用语句
python -m youtube_dl -F https://www.youtube.com/watch?v=nqJfEK8yAUo --verbose
找到报错路径
File "C:\Python310\lib\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_profil
替换
'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profil
为
'uploader_id': self._search_regex(r'/(?:channel/|user/|@)([^/?&#]+)',owner_profile_url,'uploader id', default=None),
完成!