youtube-dl 报错 Unable to extract uploader id

安装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),

完成!


作者:spike

分类: Tool

创作时间:2023-08-07

更新时间:2024-12-09

联系方式放在中括号之中例如[[email protected]],回复评论在开头加上标号例如:#1