youtube-dl 配置文件的格式是什么?

youtube-dl 配置文件的格式是什么?

哪里都找不到。我知道它进入/etc/youtube-dl.conf~/.config/youtube-dl/config

答案1

没有格式。只需将命令行选项放在文件中,例如--extract-audio --no-mtime

来源

因此每个配置选项一行,例如要更改保留标准文件名的默认目录,只需要这一行:

-o '~/Downloads/%(title)s-%(id)s.%(ext)s'

答案2

尝试这个:

w3@aardvark:~(0)$ apt-cache search youtube-dl
youtube-dl - downloader of videos from YouTube and other sites
nicovideo-dl - Download videos from www.nicovideo.jp
w3@aardvark:~(0)$ dpkg -l !$
dpkg -l youtube-dl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                                  Version                 Architecture            Description
+++-=====================================-=======================-=======================-================================================================================
ii  youtube-dl                            2014.02.17-1            all                     downloader of videos from YouTube and other sites
w3@aardvark:~(0)$ dpkg -L !$
dpkg -L youtube-dl
/.
/etc
/etc/bash_completion.d
/etc/bash_completion.d/youtube-dl.bash-completion

等等 - 列出youtube-dl包中的所有文件,包括:

 /usr/share/man/man1/youtube-dl.1.gz

而且,如果你读过man youtube-dl它会告诉你:

CONFIGURATION
       You  can  configure  youtube-dl  by  placing  default  arguments  (such  as  --extract-audio --no-mtime  to  always  extract the audio and not copy the mtime) into
       /etc/youtube-dl.conf and/or ~/.config/youtube-dl.conf.  On Windows, the  configuration  file  locations  are  %APPDATA%\youtube-dl\config.txt  and  C:\Users\<Your‐
       name>\youtube-dl.conf.

相关内容