yt-dlp 权限被拒绝错误

yt-dlp 权限被拒绝错误

由于youtube-dl阅读 速度慢这次讨论我正在尝试使用yt-dlp(当前版本:2021.12.27)。
但是运行时yt-dlp https://youtu.be/qIX1BhvUMJ0出现错误。错误如下:

[youtube] qIX1BhvUMJ0: Downloading webpage
[youtube] qIX1BhvUMJ0: Downloading android player API JSON
[info] qIX1BhvUMJ0: Downloading 1 format(s): 18
[download] Got file access error. Retrying (attempt 1 of 10) ...
[download] Got file access error. Retrying (attempt 2 of 10) ...
[download] Got file access error. Retrying (attempt 3 of 10) ...
[download] Got file access error. Retrying (attempt 4 of 10) ...
[download] Got file access error. Retrying (attempt 5 of 10) ...
[download] Got file access error. Retrying (attempt 6 of 10) ...
[download] Got file access error. Retrying (attempt 7 of 10) ...
[download] Got file access error. Retrying (attempt 8 of 10) ...
[download] Got file access error. Retrying (attempt 9 of 10) ...
[download] Got file access error. Retrying (attempt 10 of 10) ...
ERROR: unable to open for writing: [Errno 13] Permission denied: '12 seconds later [qIX1BhvUMJ0].mp4.part'  

我不知道这是什么。请帮帮我。

编辑1:

我如何安装yt-dlp=>https://github.com/yt-dlp/yt-dlp#installation
yt-dlp https://youtu.be/qIX1BhvUMJ0从主目录运行/home/abhishek

答案1

使用yt-dlp的-P选项指定写入文件的路径,并确保当前用户对该路径具有写权限。

yt-dlp -P /home/example https://youtu.be/zzzzz

问题也可能是因为您安装了 yt-dlp 的 snap,然后它会尝试将文件保存到 snap 安装中的文件夹结构中。如果这是问题所在,那么最好删除 snap 并通过 pip 安装。

答案2

我想对其他可能使用 youtube-dl-material 的人说一下,

我收到这个错误

ERROR: unable to create directory [Errno 13] Permission denied:

因为我的目录路径开头使用了斜线 ( / )。这是一个相对路径,我花了大约 2 周的时间才弄清楚,最后终于弄明白了。只需从我的目录中删除开头的 / 即可,

代替

"/home/videos" 

这将是

"home/videos"

相关内容