{"id":2941,"date":"2022-09-11T13:23:51","date_gmt":"2022-09-11T05:23:51","guid":{"rendered":"http:\/\/blog.zengqq.com.cn\/?p=2941"},"modified":"2022-09-27T00:14:48","modified_gmt":"2022-09-26T16:14:48","slug":"youtube-dl%e7%9a%84%e4%b8%ad%e6%96%87%e8%af%b4%e6%98%8e","status":"publish","type":"post","link":"https:\/\/blog.zengqq.com.cn\/?p=2941","title":{"rendered":"Youtube-dl\u7684\u4e2d\u6587\u8bf4\u660e"},"content":{"rendered":"\n<p>youtube-dl &#8211; \u4eceyoutube.com\u6216\u5176\u4ed6\u89c6\u9891\u5e73\u53f0\u4e0b\u8f7d\u89c6\u9891<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"#install\">\u5b89\u88c5<\/a><\/li><li><a href=\"#descrip\">\u63cf\u8ff0<\/a><\/li><li><a href=\"#options\">\u9009\u9879<\/a> <ul><li><a href=\"#network\">\u7f51\u7edc\u9009\u9879<\/a><\/li><li><a href=\"#geo\">\u5730\u7406\u9650\u5236\u9009\u9879<\/a><\/li><li><a href=\"#age\">\u5e74\u9f84\u9650\u5236<\/a><\/li><li><a href=\"#video\">\u89c6\u9891\u9009\u62e9<\/a><\/li><li><a href=\"#download\">\u4e0b\u8f7d\u9009\u9879<\/a><\/li><li><a href=\"#fs\">\u6587\u4ef6\u7cfb\u7edf\u9009\u9879<\/a><\/li><li><a href=\"#abstract\">\u7f29\u7565\u56fe<\/a><\/li><li><a href=\"#Simulate\">\u8fd8\u539f\u5ea6<\/a><\/li><li><a href=\"#alternative\">\u66ff\u4ee3\u65b9\u6848<\/a><\/li><li><a href=\"#videoformat\">\u89c6\u9891\u683c\u5f0f\u9009\u9879<\/a><\/li><li><a href=\"#subtitles\">\u5b57\u5e55\u9009\u9879<\/a><\/li><li><a href=\"#identification\">\u8eab\u4efd\u9a8c\u8bc1\u9009\u9879<\/a><\/li><li><a href=\"#adobe\">Adobe pass<\/a><\/li><li><a href=\"#post\">\u540e\u671f\u5904\u7406<\/a><\/li><\/ul><\/li><li><a href=\"#configuration\">\u914d\u7f6e<\/a><\/li><li><a href=\"#output-template\">\u8f93\u51fa\u6a21\u677f<\/a><\/li><li><a href=\"#format-selection\">\u683c\u5f0f\u9009\u62e9<\/a><\/li><li><a href=\"#video-selection\">\u89c6\u9891\u9009\u62e9<\/a><\/li><li><a href=\"#faq\">\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/a><\/li><li><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#developer-instructions\">\u5f00\u53d1\u4eba\u5458\u8bf4\u660e<\/a><\/li><li><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#embedding-youtube-dl\">\u5d4c\u5165YOUTUBE-DL<\/a><\/li><li><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#bugs\">\u6f0f\u6d1e<\/a><\/li><li><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#copyright\">\u7248\u6743<\/a><\/li><\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"install\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#installation\"><\/a>\u5b89\u88c5<\/h1>\n\n\n\n<p>\u8981\u7acb\u5373\u4e3a\u6240\u6709UNIX\u7528\u6237\uff08Linux\u3001macOS\u7b49\uff09\u5b89\u88c5\u5b83\uff0c\u8bf7\u952e\u5165\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo curl -L https:\/\/yt-dl.org\/downloads\/latest\/youtube-dl -o \/usr\/local\/bin\/youtube-dl\nsudo chmod a+rx \/usr\/local\/bin\/youtube-dl\n<\/pre>\n\n\n\n<p>\u5982\u679c\u60a8\u6ca1\u6709crul\uff0c\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528\u6700\u8fd1\u7684wget\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo wget https:\/\/yt-dl.org\/downloads\/latest\/youtube-dl -O \/usr\/local\/bin\/youtube-dl\nsudo chmod a+rx \/usr\/local\/bin\/youtube-dl\n<\/pre>\n\n\n\n<p>Windows\u7528\u6237\u53ef\u4ee5<a href=\"https:\/\/yt-dl.org\/latest\/youtube-dl.exe\">\u4e0b\u8f7d.exe\u6587\u4ef6<\/a>\u5e76\u5c06\u5176\u653e\u7f6e\u5728<a href=\"https:\/\/en.wikipedia.org\/wiki\/PATH_%28variable%29\">PATH<\/a>\u4e0a\u7684\u4efb\u4f55\u4f4d\u7f6e\uff0c\u4f46<code>%SYSTEMROOT%\\System32<\/code>\uff08\u4f8b\u5982\uff0c<strong>\u4e0d\u8981<\/strong>\u653e\u5165<code>C:\\Windows\\System32<\/code>\uff09\u3002<\/p>\n\n\n\n<p>\u60a8\u4e5f\u53ef\u4ee5\u4f7f\u7528pip\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo -H pip install --upgrade youtube-dl\n<\/pre>\n\n\n\n<p>\u5982\u679c\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86youtube-dl\uff0c\u6b64\u547d\u4ee4\u5c06\u66f4\u65b0\u5b83\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/pypi.python.org\/pypi\/youtube_dl\">pypi\u9875\u9762<\/a>\u3002<\/p>\n\n\n\n<p>macOS\u7528\u6237\u53ef\u4ee5\u4f7f\u7528<a href=\"https:\/\/brew.sh\/\">Homebrew<\/a>\u5b89\u88c5youtube-dl\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">brew install youtube-dl\n<\/pre>\n\n\n\n<p>\u6216\u8005\u4f7f\u7528<a href=\"https:\/\/www.macports.org\/\">MacPorts<\/a>\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo port install youtube-dl\n<\/pre>\n\n\n\n<p>\u6216\u8005\uff0c\u8bf7\u53c2\u8003<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#developer-instructions\">\u5f00\u53d1\u4eba\u5458\u8bf4\u660e<\/a>\uff0c\u4e86\u89e3\u5982\u4f55\u7ed3\u8d26\u5e76\u4f7f\u7528git\u5b58\u50a8\u5e93\u3002\u6709\u5173\u5176\u4ed6\u9009\u9879\uff0c\u5305\u62ecPGP\u7b7e\u540d\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/ytdl-org.github.io\/youtube-dl\/download.html\">youtube-dl\u4e0b\u8f7d\u9875\u9762<\/a>\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"descrip\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#description\"><\/a>\u63cf\u8ff0<\/h1>\n\n\n\n<p><strong>youtube-dl<\/strong>\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u7a0b\u5e8f\uff0c\u7528\u4e8e\u4eceYouTube.com\u548c\u5176\u4ed6\u51e0\u4e2a\u7f51\u7ad9\u4e0b\u8f7d\u89c6\u9891\u3002\u5b83\u9700\u8981Python\u89e3\u91ca\u5668\uff0c\u7248\u672c2.6\u30012.7\u62163.2+\uff0c\u5e76\u4e14\u5b83\u4e0d\u662f\u7279\u5b9a\u4e8e\u5e73\u53f0\u7684\u3002\u5b83\u5e94\u8be5\u53ef\u4ee5\u5728Unix\u76d2\u5b50\u3001Windows\u6216macOS\u4e0a\u5de5\u4f5c\u3002\u5b83\u88ab\u53d1\u5e03\u5230\u516c\u5171\u9886\u57df\uff0c\u8fd9\u610f\u5473\u7740\u60a8\u53ef\u4ee5\u4fee\u6539\u3001\u91cd\u65b0\u5206\u53d1\u6216\u968f\u610f\u4f7f\u7528\u5b83\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">youtube-dl [OPTIONS] URL [URL...]\n<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"options\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#options\"><\/a>\u9009\u9879<\/h1>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-h, --help                           Print this help text and exit\n--version                            Print program version and exit\n-U, --update                         Update this program to latest version.\n                                     Make sure that you have sufficient\n                                     permissions (run with sudo if needed)\n-i, --ignore-errors                  Continue on download errors, for\n                                     example to skip unavailable videos in a\n                                     playlist\n--abort-on-error                     Abort downloading of further videos (in\n                                     the playlist or the command line) if an\n                                     error occurs\n--dump-user-agent                    Display the current browser\n                                     identification\n--list-extractors                    List all supported extractors\n--extractor-descriptions             Output descriptions of all supported\n                                     extractors\n--force-generic-extractor            Force extraction to use the generic\n                                     extractor\n--default-search PREFIX              Use this prefix for unqualified URLs.\n                                     For example \"gvsearch2:\" downloads two\n                                     videos from google videos for youtube-\n                                     dl \"large apple\". Use the value \"auto\"\n                                     to let youtube-dl guess (\"auto_warning\"\n                                     to emit a warning when guessing).\n                                     \"error\" just throws an error. The\n                                     default value \"fixup_error\" repairs\n                                     broken URLs, but emits an error if this\n                                     is not possible instead of searching.\n--ignore-config                      Do not read configuration files. When\n                                     given in the global configuration file\n                                     \/etc\/youtube-dl.conf: Do not read the\n                                     user configuration in\n                                     ~\/.config\/youtube-dl\/config\n                                     (%APPDATA%\/youtube-dl\/config.txt on\n                                     Windows)\n--config-location PATH               Location of the configuration file;\n                                     either the path to the config or its\n                                     containing directory.\n--flat-playlist                      Do not extract the videos of a\n                                     playlist, only list them.\n--mark-watched                       Mark videos watched (YouTube only)\n--no-mark-watched                    Do not mark videos watched (YouTube\n                                     only)\n--no-color                           Do not emit color codes in output\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"network\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#network-options\"><\/a>\u7f51\u7edc\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--proxy URL                          Use the specified HTTP\/HTTPS\/SOCKS\n                                     proxy. To enable SOCKS proxy, specify a\n                                     proper scheme. For example\n                                     socks5:\/\/127.0.0.1:1080\/. Pass in an\n                                     empty string (--proxy \"\") for direct\n                                     connection\n--socket-timeout SECONDS             Time to wait before giving up, in\n                                     seconds\n--source-address IP                  Client-side IP address to bind to\n-4, --force-ipv4                     Make all connections via IPv4\n-6, --force-ipv6                     Make all connections via IPv6\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"geo\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#geo-restriction\"><\/a>\u5730\u7406\u9650\u5236\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--geo-verification-proxy URL         Use this proxy to verify the IP address\n                                     for some geo-restricted sites. The\n                                     default proxy specified by --proxy (or\n                                     none, if the option is not present) is\n                                     used for the actual downloading.\n--geo-bypass                         Bypass geographic restriction via\n                                     faking X-Forwarded-For HTTP header\n--no-geo-bypass                      Do not bypass geographic restriction\n                                     via faking X-Forwarded-For HTTP header\n--geo-bypass-country CODE            Force bypass geographic restriction\n                                     with explicitly provided two-letter ISO\n                                     3166-2 country code\n--geo-bypass-ip-block IP_BLOCK       Force bypass geographic restriction\n                                     with explicitly provided IP block in\n                                     CIDR notation\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"age\">\u5e74\u9f84\u9650\u5236\uff1a<\/h2>\n\n\n\n<p>\u5229\u7528\u5bfc\u51fayoutube\u767b\u9646\u4e4b\u540e\u7684cookie\uff0c\u6765\u5b8c\u7f8e\u89e3\u51b3\u6210\u4eba\u5185\u5bb9\u89c6\u9891\u4e0b\u8f7d\u9650\u5236\u3002\u8fd9\u4e2a\u9700\u8981\u4e00\u4e2a\u5c0f\u63d2\u4ef6 <a rel=\"noreferrer noopener\" href=\"https:\/\/chrome.google.com\/webstore\/detail\/get-cookiestxt\/bgaddhkoddajcdgocldbbfleckgcbcid\" target=\"_blank\">Get  Cookie<\/a>,\u8be5\u63d2\u4ef6\u53ef\u4ee5\u767b\u5f55youtube\u540e\u5bfc\u51facookie\uff0c\u5e76\u547d\u540d\u4e3ayoutube.com_cookies.txt\u5b58\u5230\u672c\u5730,\u8bb0\u5f97\u5728\u6307\u4ee4\u884c\u7528\u7edd\u5bf9\u8def\u5f84\u8c03\u7528cookies\uff0c\u5f53\u7136\u5982\u679c\u4f60\u7684cookie\u5c31\u5728\u5f53\u524d\u8282\u70b9\uff0c\u90a3\u5c31\u53ef\u4ee5\u4e0d\u7528\u8def\u5f84\u3002<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"519\" class=\"wp-image-3017\" style=\"width: 800px;\" src=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/09\/\u622a\u5c4f2022-09-27-\u4e0a\u534812.13.00.png\" alt=\"extract cookie\" srcset=\"https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/09\/\u622a\u5c4f2022-09-27-\u4e0a\u534812.13.00.png 1178w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/09\/\u622a\u5c4f2022-09-27-\u4e0a\u534812.13.00-480x311.png 480w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/09\/\u622a\u5c4f2022-09-27-\u4e0a\u534812.13.00-1024x664.png 1024w, https:\/\/blog.zengqq.com.cn\/wp-content\/uploads\/2022\/09\/\u622a\u5c4f2022-09-27-\u4e0a\u534812.13.00-768x498.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n\n\n\n<p>\u5728Github\u91cc\u9762\u6709\u4eba\u8ba8\u8bba\u7528-u,-p\u7684\u529e\u6cd5\u767b\u5f55youtube\uff0c\u5b9e\u9645\u4e0a\u884c\u4e0d\u901a\uff0c \u56e0\u4e3ayoutube\u4e0d\u652f\u6301\u8fd9\u79cd\u6307\u4ee4\u767b\u5f55\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--cookies  YOUR-COOKIE                      use the download directory to \n                                            save the cookie in Documents\n#how to use ? please note use the absolute path for cookies \n#if you are not save cookie in current download folder example:\nyoutube-dl --cookies ~\/Documents\/youtube.com_cookies.txt [YouTube URL]<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"video\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#video-selection\"><\/a>\u89c6\u9891\u9009\u62e9\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--playlist-start NUMBER              Playlist video to start at (default is\n                                     1)\n--playlist-end NUMBER                Playlist video to end at (default is\n                                     last)\n--playlist-items ITEM_SPEC           Playlist video items to download.\n                                     Specify indices of the videos in the\n                                     playlist separated by commas like: \"--\n                                     playlist-items 1,2,5,8\" if you want to\n                                     download videos indexed 1, 2, 5, 8 in\n                                     the playlist. You can specify range: \"\n                                     --playlist-items 1-3,7,10-13\", it will\n                                     download the videos at index 1, 2, 3,\n                                     7, 10, 11, 12 and 13.\n--match-title REGEX                  Download only matching titles (regex or\n                                     caseless sub-string)\n--reject-title REGEX                 Skip download for matching titles\n                                     (regex or caseless sub-string)\n--max-downloads NUMBER               Abort after downloading NUMBER files\n--min-filesize SIZE                  Do not download any videos smaller than\n                                     SIZE (e.g. 50k or 44.6m)\n--max-filesize SIZE                  Do not download any videos larger than\n                                     SIZE (e.g. 50k or 44.6m)\n--date DATE                          Download only videos uploaded in this\n                                     date\n--datebefore DATE                    Download only videos uploaded on or\n                                     before this date (i.e. inclusive)\n--dateafter DATE                     Download only videos uploaded on or\n                                     after this date (i.e. inclusive)\n--min-views COUNT                    Do not download any videos with less\n                                     than COUNT views\n--max-views COUNT                    Do not download any videos with more\n                                     than COUNT views\n--match-filter FILTER                Generic video filter. Specify any key\n                                     (see the \"OUTPUT TEMPLATE\" for a list\n                                     of available keys) to match if the key\n                                     is present, !key to check if the key is\n                                     not present, key > NUMBER (like\n                                     \"comment_count > 12\", also works with\n                                     >=, &lt;, &lt;=, !=, =) to compare against a\n                                     number, key = 'LITERAL' (like \"uploader\n                                     = 'Mike Smith'\", also works with !=) to\n                                     match against a string literal and &amp; to\n                                     require multiple matches. Values which\n                                     are not known are excluded unless you\n                                     put a question mark (?) after the\n                                     operator. For example, to only match\n                                     videos that have been liked more than\n                                     100 times and disliked less than 50\n                                     times (or the dislike functionality is\n                                     not available at the given service),\n                                     but who also have a description, use\n                                     --match-filter \"like_count > 100 &amp;\n                                     dislike_count &lt;? 50 &amp; description\" .\n--no-playlist                        Download only the video, if the URL\n                                     refers to a video and a playlist.\n--yes-playlist                       Download the playlist, if the URL\n                                     refers to a video and a playlist.\n--age-limit YEARS                    Download only videos suitable for the\n                                     given age\n--download-archive FILE              Download only videos not listed in the\n                                     archive file. Record the IDs of all\n                                     downloaded videos in it.\n--include-ads                        Download advertisements as well\n                                     (experimental)\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"download\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#download-options\"><\/a>\u4e0b\u8f7d\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-r, --limit-rate RATE                Maximum download rate in bytes per\n                                     second (e.g. 50K or 4.2M)\n-R, --retries RETRIES                Number of retries (default is 10), or\n                                     \"infinite\".\n--fragment-retries RETRIES           Number of retries for a fragment\n                                     (default is 10), or \"infinite\" (DASH,\n                                     hlsnative and ISM)\n--skip-unavailable-fragments         Skip unavailable fragments (DASH,\n                                     hlsnative and ISM)\n--abort-on-unavailable-fragment      Abort downloading when some fragment is\n                                     not available\n--keep-fragments                     Keep downloaded fragments on disk after\n                                     downloading is finished; fragments are\n                                     erased by default\n--buffer-size SIZE                   Size of download buffer (e.g. 1024 or\n                                     16K) (default is 1024)\n--no-resize-buffer                   Do not automatically adjust the buffer\n                                     size. By default, the buffer size is\n                                     automatically resized from an initial\n                                     value of SIZE.\n--http-chunk-size SIZE               Size of a chunk for chunk-based HTTP\n                                     downloading (e.g. 10485760 or 10M)\n                                     (default is disabled). May be useful\n                                     for bypassing bandwidth throttling\n                                     imposed by a webserver (experimental)\n--playlist-reverse                   Download playlist videos in reverse\n                                     order\n--playlist-random                    Download playlist videos in random\n                                     order\n--xattr-set-filesize                 Set file xattribute ytdl.filesize with\n                                     expected file size\n--hls-prefer-native                  Use the native HLS downloader instead\n                                     of ffmpeg\n--hls-prefer-ffmpeg                  Use ffmpeg instead of the native HLS\n                                     downloader\n--hls-use-mpegts                     Use the mpegts container for HLS\n                                     videos, allowing to play the video\n                                     while downloading (some players may not\n                                     be able to play it)\n--external-downloader COMMAND        Use the specified external downloader.\n                                     Currently supports aria2c,avconv,axel,c\n                                     url,ffmpeg,httpie,wget\n--external-downloader-args ARGS      Give these arguments to the external\n                                     downloader\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"fs\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#filesystem-options\"><\/a>\u6587\u4ef6\u7cfb\u7edf\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-a, --batch-file FILE                File containing URLs to download ('-'\n                                     for stdin), one URL per line. Lines\n                                     starting with '#', ';' or ']' are\n                                     considered as comments and ignored.\n--id                                 Use only video ID in file name\n-o, --output TEMPLATE                Output filename template, see the\n                                     \"OUTPUT TEMPLATE\" for all the info\n--output-na-placeholder PLACEHOLDER  Placeholder value for unavailable meta\n                                     fields in output filename template\n                                     (default is \"NA\")\n--autonumber-start NUMBER            Specify the start value for\n                                     %(autonumber)s (default is 1)\n--restrict-filenames                 Restrict filenames to only ASCII\n                                     characters, and avoid \"&amp;\" and spaces in\n                                     filenames\n-w, --no-overwrites                  Do not overwrite files\n-c, --continue                       Force resume of partially downloaded\n                                     files. By default, youtube-dl will\n                                     resume downloads if possible.\n--no-continue                        Do not resume partially downloaded\n                                     files (restart from beginning)\n--no-part                            Do not use .part files - write directly\n                                     into output file\n--no-mtime                           Do not use the Last-modified header to\n                                     set the file modification time\n--write-description                  Write video description to a\n                                     .description file\n--write-info-json                    Write video metadata to a .info.json\n                                     file\n--write-annotations                  Write video annotations to a\n                                     .annotations.xml file\n--load-info-json FILE                JSON file containing the video\n                                     information (created with the \"--write-\n                                     info-json\" option)\n--cookies FILE                       File to read cookies from and dump\n                                     cookie jar in \uff08cookie can be extracted\n                                     while contents website logged in)\n--cache-dir DIR                      Location in the filesystem where\n                                     youtube-dl can store some downloaded\n                                     information permanently. By default\n                                     $XDG_CACHE_HOME\/youtube-dl or\n                                     ~\/.cache\/youtube-dl . At the moment,\n                                     only YouTube player files (for videos\n                                     with obfuscated signatures) are cached,\n                                     but that may change.\n--no-cache-dir                       Disable filesystem caching\n--rm-cache-dir                       Delete all filesystem cache files\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"abstract\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#thumbnail-options\"><\/a>\u7f29\u7565\u56fe\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--write-thumbnail                    Write thumbnail image to disk\n--write-all-thumbnails               Write all thumbnail image formats to\n                                     disk\n--list-thumbnails                    Simulate and list all available\n                                     thumbnail formats\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Simulate\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#verbosity--simulation-options\"><\/a>\u8be6\u7ec6\u5ea6\/\u6a21\u62df\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-q, --quiet                          Activate quiet mode\n--no-warnings                        Ignore warnings\n-s, --simulate                       Do not download the video and do not\n                                     write anything to disk\n--skip-download                      Do not download the video\n-g, --get-url                        Simulate, quiet but print URL\n-e, --get-title                      Simulate, quiet but print title\n--get-id                             Simulate, quiet but print id\n--get-thumbnail                      Simulate, quiet but print thumbnail URL\n--get-description                    Simulate, quiet but print video\n                                     description\n--get-duration                       Simulate, quiet but print video length\n--get-filename                       Simulate, quiet but print output\n                                     filename\n--get-format                         Simulate, quiet but print output format\n-j, --dump-json                      Simulate, quiet but print JSON\n                                     information. See the \"OUTPUT TEMPLATE\"\n                                     for a description of available keys.\n-J, --dump-single-json               Simulate, quiet but print JSON\n                                     information for each command-line\n                                     argument. If the URL refers to a\n                                     playlist, dump the whole playlist\n                                     information in a single line.\n--print-json                         Be quiet and print the video\n                                     information as JSON (video is still\n                                     being downloaded).\n--newline                            Output progress bar as new lines\n--no-progress                        Do not print progress bar\n--console-title                      Display progress in console titlebar\n-v, --verbose                        Print various debugging information\n--dump-pages                         Print downloaded pages encoded using\n                                     base64 to debug problems (very verbose)\n--write-pages                        Write downloaded intermediary pages to\n                                     files in the current directory to debug\n                                     problems\n--print-traffic                      Display sent and read HTTP traffic\n-C, --call-home                      Contact the youtube-dl server for\n                                     debugging\n--no-call-home                       Do NOT contact the youtube-dl server\n                                     for debugging\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"alternative\">\u66ff\u4ee3\u65b9\u6848\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--encoding ENCODING                  Force the specified encoding\n                                     (experimental)\n--no-check-certificate               Suppress HTTPS certificate validation\n--prefer-insecure                    Use an unencrypted connection to\n                                     retrieve information about the video.\n                                     (Currently supported only for YouTube)\n--user-agent UA                      Specify a custom user agent\n--referer URL                        Specify a custom referer, use if the\n                                     video access is restricted to one\n                                     domain\n--add-header FIELD:VALUE             Specify a custom HTTP header and its\n                                     value, separated by a colon ':'. You\n                                     can use this option multiple times\n--bidi-workaround                    Work around terminals that lack\n                                     bidirectional text support. Requires\n                                     bidiv or fribidi executable in PATH\n--sleep-interval SECONDS             Number of seconds to sleep before each\n                                     download when used alone or a lower\n                                     bound of a range for randomized sleep\n                                     before each download (minimum possible\n                                     number of seconds to sleep) when used\n                                     along with --max-sleep-interval.\n--max-sleep-interval SECONDS         Upper bound of a range for randomized\n                                     sleep before each download (maximum\n                                     possible number of seconds to sleep).\n                                     Must only be used along with --min-\n                                     sleep-interval.\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"videoformat\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#video-format-options\"><\/a>\u89c6\u9891\u683c\u5f0f\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-f, --format FORMAT                  Video format code, see the \"FORMAT\n                                     SELECTION\" for all the info\n--all-formats                        Download all available video formats\n--prefer-free-formats                Prefer free video formats unless a\n                                     specific one is requested\n-F, --list-formats                   List all available formats of requested\n                                     videos\n--youtube-skip-dash-manifest         Do not download the DASH manifests and\n                                     related data on YouTube videos\n--merge-output-format FORMAT         If a merge is required (e.g.\n                                     bestvideo+bestaudio), output to given\n                                     container format. One of mkv, mp4, ogg,\n                                     webm, flv. Ignored if no merge is\n                                     required\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"subtitles\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#subtitle-options\"><\/a>\u5b57\u5e55\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--write-sub                          Write subtitle file\n--write-auto-sub                     Write automatically generated subtitle\n                                     file (YouTube only)\n--all-subs                           Download all the available subtitles of\n                                     the video\n--list-subs                          List all available subtitles for the\n                                     video\n--sub-format FORMAT                  Subtitle format, accepts formats\n                                     preference, for example: \"srt\" or\n                                     \"ass\/srt\/best\"\n--sub-lang LANGS                     Languages of the subtitles to download\n                                     (optional) separated by commas, use\n                                     --list-subs for available language tags\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"identification\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#authentication-options\"><\/a>\u8eab\u4efd\u9a8c\u8bc1\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-u, --username USERNAME              Login with this account ID\n-p, --password PASSWORD              Account password. If this option is\n                                     left out, youtube-dl will ask\n                                     interactively.\n-2, --twofactor TWOFACTOR            Two-factor authentication code\n-n, --netrc                          Use .netrc authentication data\n--video-password PASSWORD            Video password (vimeo, youku)\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adobe\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#adobe-pass-options\"><\/a>Adobe Pass\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--ap-mso MSO                         Adobe Pass multiple-system operator (TV\n                                     provider) identifier, use --ap-list-mso\n                                     for a list of available MSOs\n--ap-username USERNAME               Multiple-system operator account login\n--ap-password PASSWORD               Multiple-system operator account\n                                     password. If this option is left out,\n                                     youtube-dl will ask interactively.\n--ap-list-mso                        List all supported multiple-system\n                                     operators\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"post\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#post-processing-options\"><\/a>\u540e\u671f\u5904\u7406\u9009\u9879\uff1a<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-x, --extract-audio                  Convert video files to audio-only files\n                                     (requires ffmpeg\/avconv and\n                                     ffprobe\/avprobe)\n--audio-format FORMAT                Specify audio format: \"best\", \"aac\",\n                                     \"flac\", \"mp3\", \"m4a\", \"opus\", \"vorbis\",\n                                     or \"wav\"; \"best\" by default; No effect\n                                     without -x\n--audio-quality QUALITY              Specify ffmpeg\/avconv audio quality,\n                                     insert a value between 0 (better) and 9\n                                     (worse) for VBR or a specific bitrate\n                                     like 128K (default 5)\n--recode-video FORMAT                Encode the video to another format if\n                                     necessary (currently supported:\n                                     mp4|flv|ogg|webm|mkv|avi)\n--postprocessor-args ARGS            Give these arguments to the\n                                     postprocessor\n-k, --keep-video                     Keep the video file on disk after the\n                                     post-processing; the video is erased by\n                                     default\n--no-post-overwrites                 Do not overwrite post-processed files;\n                                     the post-processed files are\n                                     overwritten by default\n--embed-subs                         Embed subtitles in the video (only for\n                                     mp4, webm and mkv videos)\n--embed-thumbnail                    Embed thumbnail in the audio as cover\n                                     art\n--add-metadata                       Write metadata to the video file\n--metadata-from-title FORMAT         Parse additional metadata like song\n                                     title \/ artist from the video title.\n                                     The format syntax is the same as\n                                     --output. Regular expression with named\n                                     capture groups may also be used. The\n                                     parsed parameters replace existing\n                                     values. Example: --metadata-from-title\n                                     \"%(artist)s - %(title)s\" matches a\n                                     title like \"Coldplay - Paradise\".\n                                     Example (regex): --metadata-from-title\n                                     \"(?P&lt;artist>.+?) - (?P&lt;title>.+)\"\n--xattrs                             Write metadata to the video file's\n                                     xattrs (using dublin core and xdg\n                                     standards)\n--fixup POLICY                       Automatically correct known faults of\n                                     the file. One of never (do nothing),\n                                     warn (only emit a warning),\n                                     detect_or_warn (the default; fix file\n                                     if we can, warn otherwise)\n--prefer-avconv                      Prefer avconv over ffmpeg for running\n                                     the postprocessors\n--prefer-ffmpeg                      Prefer ffmpeg over avconv for running\n                                     the postprocessors (default)\n--ffmpeg-location PATH               Location of the ffmpeg\/avconv binary;\n                                     either the path to the binary or its\n                                     containing directory.\n--exec CMD                           Execute a command on the file after\n                                     downloading and post-processing,\n                                     similar to find's -exec syntax.\n                                     Example: --exec 'adb push {}\n                                     \/sdcard\/Music\/ &amp;&amp; rm {}'\n--convert-subs FORMAT                Convert the subtitles to other format\n                                     (currently supported: srt|ass|vtt|lrc)\n<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"configuration\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#configuration\"><\/a>\u914d\u7f6e<\/h1>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u5c06\u4efb\u4f55\u53d7\u652f\u6301\u7684\u547d\u4ee4\u884c\u9009\u9879\u653e\u7f6e\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u6765\u914d\u7f6eyoutube-dl\u3002\u5728Linux\u548cmacOS\u4e0a\uff0c\u7cfb\u7edf\u8303\u56f4\u7684\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e<code>\/etc\/youtube-dl.conf<\/code>\uff0c\u7528\u6237\u8303\u56f4\u7684\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e<code>~\/.config\/youtube-dl\/config<\/code>\u3002\u5728Windows\u4e0a\uff0c\u7528\u6237\u8303\u56f4\u7684\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e\u4e3a<code>%APPDATA%\\youtube-dl\\config.txt<\/code>\u6216<code>C:\\Users\\&lt;user name&gt;\\youtube-dl.conf<\/code>\u3002\u8bf7\u6ce8\u610f\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u914d\u7f6e\u6587\u4ef6\u53ef\u80fd\u4e0d\u5b58\u5728\uff0c\u56e0\u6b64\u60a8\u53ef\u80fd\u9700\u8981\u81ea\u5df1\u521b\u5efa\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u4f7f\u7528\u4ee5\u4e0b\u914d\u7f6e\u6587\u4ef6\uff0cyoutube-dl\u5c06\u59cb\u7ec8\u63d0\u53d6\u97f3\u9891\uff0c\u800c\u4e0d\u662f\u590d\u5236mtime\uff0c\u4f7f\u7528\u4ee3\u7406\u5e76\u5c06\u6240\u6709\u89c6\u9891\u4fdd\u5b58\u5728<code>Movies<\/code>\u76ee\u5f55\u4e0b\uff0c\u5e76\u4fdd\u5b58\u5728\u4e3b\u76ee\u5f55\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Lines starting with # are comments\n\n# Always extract audio\n-x\n\n# Do not copy the mtime\n--no-mtime\n\n# Use this proxy\n--proxy 127.0.0.1:3128\n\n# Save all videos under Movies directory in your home directory\n-o ~\/Movies\/%(title)s.%(ext)s\n<\/pre>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u9009\u9879\u4e0e\u5e38\u89c4\u547d\u4ee4\u884c\u8c03\u7528\u4e2d\u4f7f\u7528\u7684\u9009\u9879\uff08\u53c8\u540d\u5f00\u5173\uff09\u76f8\u540c\uff0c\u56e0\u6b64\u5728<code>-<\/code>\u6216<code>--<\/code>\u4e4b\u540e<strong>\u5fc5\u987b\u6ca1\u6709\u7a7a\u683c<\/strong>\uff0c\u4f8b\u5982<code>-o<\/code>\u6216<code>--proxy<\/code>\uff0c\u4f46\u4e0d\u662f<code>- o<\/code>\u6216<code>-- proxy<\/code>\u3002<\/p>\n\n\n\n<p>You can use&nbsp;<code>--ignore-config<\/code>&nbsp;if you want to disable the configuration file for a particular youtube-dl run.<\/p>\n\n\n\n<p>You can also use&nbsp;<code>--config-location<\/code>&nbsp;if you want to use custom configuration file for a particular youtube-dl run.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#authentication-with-netrc-file\"><\/a>\u4f7f\u7528<code>.netrc<\/code>\u6587\u4ef6\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1<\/h3>\n\n\n\n<p>\u60a8\u53ef\u80fd\u8fd8\u60f3\u4e3a\u652f\u6301\u8eab\u4efd\u9a8c\u8bc1\u7684\u63d0\u53d6\u5668\u914d\u7f6e\u81ea\u52a8\u51ed\u636e\u5b58\u50a8\uff08\u901a\u8fc7\u63d0\u4f9b\u5e26\u6709<code>--username<\/code>\u548c<code>--password<\/code>\u767b\u5f55\u548c\u5bc6\u7801\uff09\uff0c\u4ee5\u4fbf\u4e0d\u5c06\u51ed\u636e\u4f5c\u4e3a\u6bcf\u6b21youtube-dl\u6267\u884c\u7684\u547d\u4ee4\u884c\u53c2\u6570\u4f20\u9012\uff0c\u5e76\u9632\u6b62\u8ddf\u8e2ashell\u547d\u4ee4\u5386\u53f2\u8bb0\u5f55\u4e2d\u7684\u7eaf\u6587\u672c\u5bc6\u7801\u3002\u60a8\u53ef\u4ee5\u5728\u6bcf\u4e2a\u63d0\u53d6\u5668\u7684\u57fa\u7840\u4e0a\u4f7f\u7528<a href=\"https:\/\/stackoverflow.com\/tags\/.netrc\/info\"><code>.netrc<\/code>\u6587\u4ef6<\/a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002\u4e3a\u6b64\uff0c\u60a8\u9700\u8981\u5728<code>$HOME<\/code>\u4e2d\u521b\u5efa\u4e00\u4e2a<code>.netrc<\/code>\u6587\u4ef6\uff0c\u5e76\u9650\u5236\u4ec5\u7531\u60a8\u8bfb\u53d6\/\u5199\u5165\u7684\u6743\u9650\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">touch $HOME\/.netrc\nchmod a-rwx,u+rw $HOME\/.netrc\n<\/pre>\n\n\n\n<p>\u4e4b\u540e\uff0c\u60a8\u53ef\u4ee5\u4ee5\u4ee5\u4e0b\u683c\u5f0f\u6dfb\u52a0\u63d0\u53d6\u5668\u7684\u51ed\u636e\uff0c\u5176\u4e2d<em>\u63d0\u53d6\u5668<\/em>\u662f\u5c0f\u5199\u63d0\u53d6\u5668\u7684\u540d\u79f0\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">machine &lt;extractor> login &lt;login> password &lt;password>\n<\/pre>\n\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">machine youtube login myaccount@gmail.com password my_youtube_password\nmachine twitch login my_twitch_account_name password my_twitch_password\n<\/pre>\n\n\n\n<p>\u8981\u6fc0\u6d3b<code>.netrc<\/code>\u6587\u4ef6\u7684\u8eab\u4efd\u9a8c\u8bc1\uff0c\u60a8\u5e94\u8be5\u5c06<code>--netrc<\/code>\u4f20\u9012\u7ed9youtube-dl\u6216\u5c06\u5176\u653e\u5165<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#configuration\">\u914d\u7f6e\u6587\u4ef6\u4e2d<\/a>\u3002<\/p>\n\n\n\n<p>\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u80fd\u8fd8\u9700\u8981\u624b\u52a8\u8bbe\u7f6e<code>%HOME%<\/code>\u73af\u5883\u53d8\u91cf\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">set HOME=%USERPROFILE%\n<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"output-template\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#output-template\"><\/a>\u8f93\u51fa\u6a21\u677f<\/h1>\n\n\n\n<p><code>-o<\/code>\u9009\u9879\u5141\u8bb8\u7528\u6237\u4e3a\u8f93\u51fa\u6587\u4ef6\u540d\u6307\u793a\u6a21\u677f\u3002<\/p>\n\n\n\n<p><strong>tl;dr\uff1a<\/strong><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#output-template-examples\">\u5f15\u5bfc\u6211\u67e5\u770b\u793a\u4f8b<\/a>\u3002<\/p>\n\n\n\n<p>\u57fa\u672c\u7528\u6cd5\u662f\u5728\u4e0b\u8f7d\u5355\u4e2a\u6587\u4ef6\u65f6\u4e0d\u8bbe\u7f6e\u4efb\u4f55\u6a21\u677f\u53c2\u6570\uff0c\u4f8b\u5982\u5728<code>youtube-dl -o funny_video.flv \"https:\/\/some\/video\"<\/code>\u7136\u800c\uff0c\u5b83\u53ef\u80fd\u5305\u542b\u7279\u6b8a\u5e8f\u5217\uff0c\u5c06\u5728\u4e0b\u8f7d\u6bcf\u4e2a\u89c6\u9891\u65f6\u66ff\u6362\u3002\u7279\u6b8a\u5e8f\u5217\u53ef\u4ee5\u6839\u636e<a href=\"https:\/\/docs.python.org\/2\/library\/stdtypes.html#string-formatting\">python\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u64cd\u4f5c\u8fdb\u884c<\/a>\u683c\u5f0f\u5316\u3002\u4f8b\u5982\uff0c<code>%(NAME)s<\/code>\u6216<code>%(NAME)05d<\/code>\u3002\u4e3a\u4e86\u6f84\u6e05\uff0c\u8fd9\u662f\u4e00\u4e2a\u767e\u5206\u6bd4\u7b26\u53f7\uff0c\u62ec\u53f7\u4e2d\u540e\u8ddf\u4e00\u4e2a\u540d\u79f0\uff0c\u7136\u540e\u662f\u683c\u5f0f\u5316\u64cd\u4f5c\u3002\u5141\u8bb8\u7684\u540d\u79f0\u548c\u5e8f\u5217\u7c7b\u578b\u662f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u6807\u8bc6\u7b26<\/li><li><code>title<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u6807\u9898<\/li><li><code>url<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891URL<\/li><li><code>ext<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u6587\u4ef6\u6269\u5c55\u540d<\/li><li><code>alt_title<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u7684\u6b21\u8981\u6807\u9898<\/li><li><code>display_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u7684\u66ff\u4ee3\u6807\u8bc6\u7b26<\/li><li><code>uploader<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u4e0a\u4f20\u5668\u7684\u5168\u540d<\/li><li><code>license<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u7684\u8bb8\u53ef\u540d\u79f0<\/li><li><code>creator<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u7684\u521b\u5efa\u8005<\/li><li><code>release_date<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u53d1\u5e03\u65e5\u671f\uff08YYYYMMDD\uff09<\/li><li><code>timestamp<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u53ef\u7528\u65f6\u7684UNIX\u65f6\u95f4\u6233<\/li><li><code>upload_date<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u4e0a\u4f20\u65e5\u671f\uff08YYYYMMDD\uff09<\/li><li><code>uploader_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u4e0a\u4f20\u8005\u7684\u6635\u79f0\u6216ID<\/li><li><code>channel<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u4e0a\u4f20\u9891\u9053\u7684\u5168\u540d<\/li><li><code>channel_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u9891\u9053\u7684ID<\/li><li><code>location<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u62cd\u6444\u89c6\u9891\u7684\u7269\u7406\u4f4d\u7f6e<\/li><li><code>duration<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u957f\u5ea6\uff08\u4ee5\u79d2\u4e3a\u5355\u4f4d\uff09<\/li><li><code>view_count<\/code>\uff08\u6570\u5b57\uff09\uff1a\u6709\u591a\u5c11\u7528\u6237\u5728\u5e73\u53f0\u4e0a\u89c2\u770b\u4e86\u89c6\u9891<\/li><li><code>like_count<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u7684\u6b63\u9762\u8bc4\u5206\u6570\u91cf<\/li><li><code>dislike_count<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u7684\u8d1f\u9762\u8bc4\u7ea7\u6570\u91cf<\/li><li><code>repost_count<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u8f6c\u53d1\u6b21\u6570<\/li><li><code>average_rating<\/code>\uff08\u6570\u5b57\uff09\uff1a\u7528\u6237\u7ed9\u51fa\u7684\u5e73\u5747\u8bc4\u5206\uff0c\u4f7f\u7528\u7684\u89c4\u6a21\u53d6\u51b3\u4e8e\u7f51\u9875<\/li><li><code>comment_count<\/code>\uff08\u6570\u5b57\uff09\uff1a\u5bf9\u89c6\u9891\u7684\u8bc4\u8bba\u6570\u91cf<\/li><li><code>age_limit<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u7684\u5e74\u9f84\u9650\u5236\uff08\u5e74\uff09<\/li><li><code>is_live<\/code>\uff08\u5e03\u5c14\uff09\uff1a\u6b64\u89c6\u9891\u662f\u76f4\u64ad\u8fd8\u662f\u56fa\u5b9a\u957f\u5ea6\u7684\u89c6\u9891<\/li><li><code>start_time<\/code>\uff08\u6570\u5b57\uff09\uff1a\u590d\u5236\u5e94\u8be5\u5f00\u59cb\u7684\u65f6\u95f4\uff08\u4ee5\u79d2\u4e3a\u5355\u4f4d\uff09\uff0c\u5982URL\u4e2d\u6240\u8ff0<\/li><li><code>end_time<\/code>\uff08\u6570\u5b57\uff09\uff1a\u590d\u5236\u5e94\u8be5\u7ed3\u675f\u7684\u65f6\u95f4\uff08\u4ee5\u79d2\u4e3a\u5355\u4f4d\uff09\uff0c\u5982URL\u4e2d\u6240\u8ff0<\/li><li><code>format<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u5bf9\u683c\u5f0f\u7684\u4eba\u7c7b\u53ef\u8bfb\u63cf\u8ff0<\/li><li><code>format_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u683c\u5f0f\u4ee3\u7801\u7531<code>--format<\/code><\/li><li><code>format_note<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u6709\u5173\u683c\u5f0f\u7684\u66f4\u591a\u4fe1\u606f<\/li><li><code>width<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u7684\u5bbd\u5ea6<\/li><li><code>height<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u7684\u9ad8\u5ea6<\/li><li><code>resolution<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u7684\u6587\u672c\u63cf\u8ff0<\/li><li><code>tbr<\/code>\uff08\u6570\u5b57\uff09\uff1a\u4ee5KBit\/s\u4e3a\u5355\u4f4d\u7684\u97f3\u9891\u548c\u89c6\u9891\u7684\u5e73\u5747\u6bd4\u7279\u7387<\/li><li><code>abr<\/code>\uff08\u6570\u5b57\uff09\uff1aKBit\/s\u7684\u5e73\u5747\u97f3\u9891\u6bd4\u7279\u7387<\/li><li><code>acodec<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u6b63\u5728\u4f7f\u7528\u7684\u97f3\u9891\u7f16\u89e3\u7801\u5668\u7684\u540d\u79f0<\/li><li><code>asr<\/code>\uff08\u6570\u5b57\uff09\uff1a\u8d6b\u5179\u7684\u97f3\u9891\u91c7\u6837\u7387<\/li><li><code>vbr<\/code>\uff08\u6570\u5b57\uff09\uff1aKBit\/s\u7684\u5e73\u5747\u89c6\u9891\u6bd4\u7279\u7387<\/li><li><code>fps<\/code>\uff08\u6570\u5b57\uff09\uff1a\u5e27\u901f\u7387<\/li><li><code>vcodec<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u6b63\u5728\u4f7f\u7528\u7684\u89c6\u9891\u7f16\u89e3\u7801\u5668\u7684\u540d\u79f0<\/li><li><code>container<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u5bb9\u5668\u683c\u5f0f\u7684\u540d\u79f0<\/li><li><code>filesize<\/code>\uff08\u6570\u5b57\uff09\uff1a\u5982\u679c\u63d0\u524d\u77e5\u9053\uff0c\u5b57\u8282\u6570<\/li><li><code>filesize_approx<\/code>\uff08\u6570\u5b57\uff09\uff1a\u5bf9\u5b57\u8282\u6570\u7684\u4f30\u8ba1<\/li><li><code>protocol<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u5c06\u7528\u4e8e\u5b9e\u9645\u4e0b\u8f7d\u7684\u534f\u8bae<\/li><li><code>extractor<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u63d0\u53d6\u5668\u7684\u540d\u79f0<\/li><li><code>extractor_key<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u63d0\u53d6\u5668\u7684\u952e\u540d<\/li><li><code>epoch<\/code>\uff08\u6570\u5b57\uff09\uff1a\u521b\u5efa\u6587\u4ef6\u65f6\u7684Unix\u7eaa\u5143<\/li><li><code>autonumber<\/code>\uff08\u6570\u5b57\uff09\uff1a\u6bcf\u6b21\u4e0b\u8f7d\u65f6\u4f1a\u589e\u52a0\u7684\u6570\u91cf\uff0c\u4ece<code>--autonumber-start<\/code><\/li><li><code>playlist<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u5305\u542b\u89c6\u9891\u7684\u64ad\u653e\u5217\u8868\u7684\u540d\u79f0\u6216ID<\/li><li><code>playlist_index<\/code>\uff08\u6570\u5b57\uff09\uff1a\u64ad\u653e\u5217\u8868\u4e2d\u7684\u89c6\u9891\u7d22\u5f15\u6839\u636e\u64ad\u653e\u5217\u8868\u7684\u603b\u957f\u5ea6\u586b\u5145\u4e86\u524d\u5bfc\u96f6<\/li><li><code>playlist_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u64ad\u653e\u5217\u8868\u6807\u8bc6\u7b26<\/li><li><code>playlist_title<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u64ad\u653e\u5217\u8868\u6807\u9898<\/li><li><code>playlist_uploader<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u64ad\u653e\u5217\u8868\u4e0a\u4f20\u5668\u7684\u5168\u540d<\/li><li><code>playlist_uploader_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u64ad\u653e\u5217\u8868\u4e0a\u4f20\u5668\u7684\u6635\u79f0\u6216ID<\/li><\/ul>\n\n\n\n<p>\u9002\u7528\u4e8e\u5c5e\u4e8e\u67d0\u4e9b\u903b\u8f91\u7ae0\u8282\u6216\u7ae0\u8282\u7684\u89c6\u9891\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>chapter<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u6240\u5c5e\u7ae0\u8282\u7684\u540d\u79f0\u6216\u6807\u9898<\/li><li><code>chapter_number<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u6240\u5c5e\u7ae0\u8282\u7684\u7f16\u53f7<\/li><li><code>chapter_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u6240\u5c5e\u7ae0\u8282\u7684ID<\/li><\/ul>\n\n\n\n<p>\u9002\u7528\u4e8e\u67d0\u4e9b\u7cfb\u5217\u6216\u8282\u76ee\u7684\u4e00\u96c6\u89c6\u9891\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>series<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u5267\u96c6\u6240\u5c5e\u7684\u7cfb\u5217\u6216\u8282\u76ee\u7684\u6807\u9898<\/li><li><code>season<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u5267\u96c6\u6240\u5c5e\u7684\u672c\u5b63\u6807\u9898<\/li><li><code>season_number<\/code>\uff08\u6570\u5b57\uff09\uff1a\u89c6\u9891\u5267\u96c6\u6240\u5c5e\u7684\u5b63\u8282\u6570\u91cf<\/li><li><code>season_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u5267\u96c6\u6240\u5c5e\u7684\u672c\u5b63ID<\/li><li><code>episode<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u96c6\u7684\u6807\u9898<\/li><li><code>episode_number<\/code>\uff08\u6570\u5b57\uff09\uff1a\u4e00\u5b63\u5185\u7684\u89c6\u9891\u5267\u96c6\u6570\u91cf<\/li><li><code>episode_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u89c6\u9891\u96c6\u7684ID<\/li><\/ul>\n\n\n\n<p>\u9002\u7528\u4e8e\u66f2\u76ee\u6216\u97f3\u4e50\u4e13\u8f91\u7684\u4e00\u90e8\u5206\u7684\u5a92\u4f53\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>track<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u8f68\u9053\u7684\u6807\u9898<\/li><li><code>track_number<\/code>\uff08\u6570\u5b57\uff09\uff1a\u4e13\u8f91\u6216\u5149\u76d8\u4e2d\u7684\u66f2\u76ee\u6570\u91cf<\/li><li><code>track_id<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u8f68\u9053\u7684ID<\/li><li><code>artist<\/code>\uff08\u5f26\uff09\uff1a\u66f2\u76ee\u7684\u827a\u672f\u5bb6<\/li><li><code>genre<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u8f68\u9053\u7684\u7c7b\u578b<\/li><li><code>album<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u66f2\u76ee\u6240\u5c5e\u4e13\u8f91\u7684\u6807\u9898<\/li><li><code>album_type<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u4e13\u8f91\u7c7b\u578b<\/li><li><code>album_artist<\/code>\uff08\u5b57\u7b26\u4e32\uff09\uff1a\u4e13\u8f91\u4e2d\u51fa\u73b0\u7684\u6240\u6709\u827a\u672f\u5bb6\u7684\u5217\u8868<\/li><li><code>disc_number<\/code>\uff08\u6570\u5b57\uff09\uff1a\u8f68\u9053\u6240\u5c5e\u7684\u5149\u76d8\u6216\u5176\u4ed6\u7269\u7406\u4ecb\u8d28\u7684\u6570\u91cf<\/li><li><code>release_year<\/code>\uff08\u6570\u5b57\uff09\uff1a\u4e13\u8f91\u53d1\u884c\u5e74\u4efd\uff08YYYYY\uff09<\/li><\/ul>\n\n\n\n<p>\u5728\u8f93\u51fa\u6a21\u677f\u4e2d\u5f15\u7528\u7684\u6bcf\u4e2a\u4e0a\u8ff0\u5e8f\u5217\u5c06\u88ab\u4e0e\u5e8f\u5217\u540d\u79f0\u76f8\u5bf9\u5e94\u7684\u5b9e\u9645\u503c\u6240\u53d6\u4ee3\u3002\u8bf7\u6ce8\u610f\uff0c\u4e00\u4e9b\u5e8f\u5217\u4e0d\u80fd\u4fdd\u8bc1\u5b58\u5728\uff0c\u56e0\u4e3a\u5b83\u4eec\u53d6\u51b3\u4e8e\u7279\u5b9a\u63d0\u53d6\u5668\u83b7\u5f97\u7684\u5143\u6570\u636e\u3002\u6b64\u7c7b\u5e8f\u5217\u5c06\u88ab<code>--output-na-placeholder<\/code>\uff08\u9ed8\u8ba4\u4e3a<code>NA<\/code>\u63d0\u4f9b\u7684\u5360\u4f4d\u7b26\u503c\u6240\u53d6\u4ee3\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u5bf9\u4e8e<code>-o %(title)s-%(id)s.%(ext)s<\/code>\u548c\u6807\u9898\u4e3a<code>youtube-dl test video<\/code>\u548cid&nbsp;<code>BaW_jenozKcj<\/code>mp4\u89c6\u9891\uff0c\u8fd9\u5c06\u5bfc\u81f4\u5728\u5f53\u524d\u76ee\u5f55\u4e2d\u521b\u5efa<code>youtube-dl test video-BaW_jenozKcj.mp4<\/code>\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u6570\u5b57\u5e8f\u5217\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4e0e\u6570\u5b57\u76f8\u5173\u7684\u683c\u5f0f\uff0c\u4f8b\u5982\uff0c<code>%(view_count)05d<\/code>\u5c06\u5bfc\u81f4\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u5176\u4e2d\u89c6\u56fe\u8ba1\u6570\u586b\u5145\u96f6\uff0c\u6700\u591a5\u4e2a\u5b57\u7b26\uff0c\u5982<code>00042<\/code>\u3002<\/p>\n\n\n\n<p>\u8f93\u51fa\u6a21\u677f\u4e5f\u53ef\u4ee5\u5305\u542b\u4efb\u610f\u7684\u5206\u5c42\u8def\u5f84\uff0c\u4f8b\u5982<code>-o '%(playlist)s\/%(playlist_index)s - %(title)s.%(ext)s'<\/code>\u8fd9\u5c06\u5bfc\u81f4\u5c06\u6bcf\u4e2a\u89c6\u9891\u4e0b\u8f7d\u5230\u4e0e\u6b64\u8def\u5f84\u6a21\u677f\u76f8\u5bf9\u5e94\u7684\u76ee\u5f55\u4e2d\u3002\u4efb\u4f55\u7f3a\u5931\u7684\u76ee\u5f55\u90fd\u5c06\u81ea\u52a8\u4e3a\u60a8\u521b\u5efa\u3002<\/p>\n\n\n\n<p>\u8981\u5728\u8f93\u51fa\u6a21\u677f\u4e2d\u4f7f\u7528\u767e\u5206\u6bd4\u6587\u5b57\uff0c\u8bf7\u4f7f\u7528<code>%%<\/code>\u3002\u8981\u8f93\u51fa\u5230stdout\uff0c\u8bf7\u4f7f\u7528<code>-o -<\/code>\u3002<\/p>\n\n\n\n<p>\u5f53\u524d\u7684\u9ed8\u8ba4\u6a21\u677f\u662f<code>%(title)s-%(id)s.%(ext)s<\/code>\u3002<\/p>\n\n\n\n<p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u60a8\u4e0d\u5e0c\u671b\u7279\u6b8a\u5b57\u7b26\uff0c\u5982\u4e2d\u3001\u7a7a\u683c\u6216&amp;\uff0c\u4f8b\u5982\u901a\u8fc78\u4f4d\u4e0d\u5b89\u5168\u901a\u9053\u5c06\u4e0b\u8f7d\u7684\u6587\u4ef6\u540d\u4f20\u8f93\u5230Windows\u7cfb\u7edf\u6216\u6587\u4ef6\u540d\u65f6\u3002\u5728\u8fd9\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6dfb\u52a0<code>--restrict-filenames<\/code>\u6807\u5fd7\u4ee5\u83b7\u5f97\u8f83\u77ed\u7684\u6807\u9898\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#output-template-and-windows-batch-files\"><\/a>\u8f93\u51fa\u6a21\u677f\u548cWindows\u6279\u5904\u7406\u6587\u4ef6<\/h4>\n\n\n\n<p>\u5982\u679c\u60a8\u5728Windows\u6279\u5904\u7406\u6587\u4ef6\u4e2d\u4f7f\u7528\u8f93\u51fa\u6a21\u677f\uff0c\u5219\u5fc5\u987b\u901a\u8fc7\u52a0\u500d\u8f6c\u4e49\u7eaf\u767e\u5206\u6bd4\u5b57\u7b26\uff08<code>%<\/code>\uff09\uff0c\u4ee5\u4fbf<code>-o \"%(title)s-%(id)s.%(ext)s\"<\/code>\u5e94\u53d8\u4e3a<code>-o \"%%(title)s-%%(id)s.%%(ext)s\"<\/code>\u4f46\u662f\uff0c\u60a8\u4e0d\u5e94\u8be5\u89e6\u6478\u975e\u7eaf\u5b57\u7b26\u7684<code>%<\/code>\uff0c\u4f8b\u5982\uff0c\u7528\u4e8e\u6269\u5c55\u7684\u73af\u5883\u53d8\u91cf\u5e94\u4fdd\u6301\u4e0d\u53d8\uff1a<code>-o \"C:\\%HOMEPATH%\\Desktop\\%%(title)s.%%(ext)s\"<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#output-template-examples\"><\/a>\u8f93\u51fa\u6a21\u677f\u793a\u4f8b<\/h4>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u53cc\u5f15\u53f7\u800c\u4e0d\u662f\u5355\u5f15\u53f7\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc\nyoutube-dl test video ''_\u00e4\u21ad\ud835\udd50.mp4    # All kinds of weird characters\n\n$ youtube-dl --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames\nyoutube-dl_test_video_.mp4          # A simple file name\n\n# Download YouTube playlist videos in separate directory indexed by video order in a playlist\n$ youtube-dl -o '%(playlist)s\/%(playlist_index)s - %(title)s.%(ext)s' https:\/\/www.youtube.com\/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\n\n# Download all playlists of YouTube channel\/user keeping each playlist in separate directory:\n$ youtube-dl -o '%(uploader)s\/%(playlist)s\/%(playlist_index)s - %(title)s.%(ext)s' https:\/\/www.youtube.com\/user\/TheLinuxFoundation\/playlists\n\n# Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home\n$ youtube-dl -u user -p password -o '~\/MyVideos\/%(playlist)s\/%(chapter_number)s - %(chapter)s\/%(title)s.%(ext)s' https:\/\/www.udemy.com\/java-tutorial\/\n\n# Download entire series season keeping each series and each season in separate directory under C:\/MyVideos\n$ youtube-dl -o \"C:\/MyVideos\/%(series)s\/%(season_number)s - %(season)s\/%(episode_number)s - %(episode)s.%(ext)s\" https:\/\/videomore.ru\/kino_v_detalayah\/5_sezon\/367617\n\n# Stream the video being downloaded to stdout\n$ youtube-dl -o - BaW_jenozKc<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"format-selection\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#format-selection\"><\/a>\u683c\u5f0f\u9009\u62e9<\/h1>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cyoutube-dl\u5c1d\u8bd5\u4e0b\u8f7d\u6700\u4f73\u53ef\u7528\u8d28\u91cf\uff0c\u5373\u5982\u679c\u60a8\u60f3\u8981\u6700\u4f73\u8d28\u91cf<strong>\uff0c\u5219\u65e0\u9700<\/strong>\u901a\u8fc7\u4efb\u4f55\u7279\u6b8a\u9009\u9879\uff0c<strong>\u9ed8\u8ba4<\/strong>\u60c5\u51b5\u4e0b\uff0cyoutube-dl\u4f1a\u4e3a\u60a8\u731c\u6d4b\u3002<\/p>\n\n\n\n<p>\u4f46\u6709\u65f6\u60a8\u53ef\u80fd\u5e0c\u671b\u4ee5\u4e0d\u540c\u7684\u683c\u5f0f\u4e0b\u8f7d\uff0c\u4f8b\u5982\u5f53\u60a8\u5904\u4e8e\u7f13\u6162\u6216\u95f4\u6b47\u6027\u8fde\u63a5\u65f6\u3002\u5b9e\u73b0\u8fd9\u4e00\u70b9\u7684\u5173\u952e\u673a\u5236\u662f\u6240\u8c13\u7684<em>\u683c\u5f0f\u9009\u62e9<\/em>\uff0c\u5728\u6b64\u57fa\u7840\u4e0a\uff0c\u60a8\u53ef\u4ee5\u663e\u5f0f\u6307\u5b9a\u6240\u9700\u7684\u683c\u5f0f\uff0c\u6839\u636e\u67d0\u4e9b\u6807\u51c6\u6216\u6807\u51c6\u9009\u62e9\u683c\u5f0f\uff0c\u8bbe\u7f6e\u4f18\u5148\u7ea7\u7b49\u3002<\/p>\n\n\n\n<p>\u683c\u5f0f\u9009\u62e9\u7684\u4e00\u822c\u8bed\u6cd5\u662f<code>--format FORMAT<\/code>\u6216shorter&nbsp;<code>-f FORMAT<\/code>\uff0c\u5176\u4e2d<code>FORMAT<\/code>\u662f<em>\u9009\u62e9\u5668\u8868\u8fbe\u5f0f<\/em>\uff0c\u5373\u63cf\u8ff0\u8981\u4e0b\u8f7d\u7684\u683c\u5f0f\u7684\u8868\u8fbe\u5f0f\u3002<\/p>\n\n\n\n<p><strong>tl;dr\uff1a<\/strong><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#format-selection-examples\">\u5f15\u5bfc\u6211\u67e5\u770b\u793a\u4f8b<\/a>\u3002<\/p>\n\n\n\n<p>The simplest case is requesting a specific format, for example with&nbsp;<code>-f 22<\/code>&nbsp;you can download the format with format code equal to 22. You can get the list of available format codes for particular video using&nbsp;<code>--list-formats<\/code>&nbsp;or&nbsp;<code>-F<\/code>. Note that these format codes are extractor specific.<\/p>\n\n\n\n<p>\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6587\u4ef6\u6269\u5c55\u540d\uff08\u76ee\u524d\u652f\u6301<code>3gp<\/code>\u3001<code>aac<\/code>\u3001<code>flv<\/code>\u3001<code>m4a<\/code>\u3001<code>mp3<\/code>\u3001<code>mp4<\/code>\u3001<code>ogg<\/code>\u3001<code>wav<\/code>\u3001<code>webm<\/code>\uff09\u4e0b\u8f7d\u4f5c\u4e3a\u5355\u4e2a\u6587\u4ef6\u7684\u7279\u5b9a\u6587\u4ef6\u6269\u5c55\u540d\u7684\u6700\u4f73\u8d28\u91cf\u683c\u5f0f\uff0c\u4f8b\u5982<code>-f webm<\/code>\u5c06\u4e0b\u8f7d\u6700\u9ad8\u8d28\u91cf\u7684\u683c\u5f0f\uff0c\u5e76\u5c06<code>webm<\/code>\u6269\u5c55\u540d\u4f5c\u4e3a\u5355\u4e2a\u6587\u4ef6\u3002<\/p>\n\n\n\n<p>\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u7279\u6b8a\u540d\u79f0\u6765\u9009\u62e9\u7279\u5b9a\u7684\u8fb9\u7f18\u5927\u5c0f\u5199\u683c\u5f0f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>best<\/code>\uff1a\u9009\u62e9\u7531\u5e26\u6709\u89c6\u9891\u548c\u97f3\u9891\u7684\u5355\u4e2a\u6587\u4ef6\u8868\u793a\u7684\u6700\u4f73\u8d28\u91cf\u683c\u5f0f\u3002<\/li><li><code>worst<\/code>\uff1a\u9009\u62e9\u7531\u5e26\u6709\u89c6\u9891\u548c\u97f3\u9891\u7684\u5355\u4e2a\u6587\u4ef6\u8868\u793a\u7684\u6700\u5dee\u8d28\u91cf\u683c\u5f0f\u3002<\/li><li><code>bestvideo<\/code>\uff1a\u9009\u62e9\u6700\u9ad8\u8d28\u91cf\u7684\u4ec5\u9650\u89c6\u9891\u683c\u5f0f\uff08\u4f8b\u5982DASH\u89c6\u9891\uff09\u3002\u53ef\u80fd\u4e0d\u53ef\u7528\u3002<\/li><li><code>worstvideo<\/code>\uff1a\u9009\u62e9\u6700\u5dee\u8d28\u91cf\u7684\u4ec5\u89c6\u9891\u683c\u5f0f\u3002\u53ef\u80fd\u4e0d\u53ef\u7528\u3002<\/li><li><code>bestaudio<\/code>\uff1a\u9009\u62e9\u6700\u4f18\u8d28\u7684\u4ec5\u97f3\u9891\u683c\u5f0f\u3002\u53ef\u80fd\u4e0d\u53ef\u7528\u3002<\/li><li><code>worstaudio<\/code>\uff1a\u9009\u62e9\u6700\u5dee\u8d28\u91cf\u7684\u4ec5\u97f3\u9891\u683c\u5f0f\u3002\u53ef\u80fd\u4e0d\u53ef\u7528\u3002<\/li><\/ul>\n\n\n\n<p>\u4f8b\u5982\uff0c\u8981\u4e0b\u8f7d\u6700\u5dee\u7684\u7eaf\u89c6\u9891\u683c\u5f0f\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>-f worstvideo<\/code>\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u4e0b\u8f7d\u591a\u4e2a\u89c6\u9891\uff0c\u4f46\u5b83\u4eec\u6ca1\u6709\u76f8\u540c\u7684\u683c\u5f0f\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u659c\u6760\u6307\u5b9a\u9996\u9009\u9879\u987a\u5e8f\u3002\u8bf7\u6ce8\u610f\uff0c\u659c\u6760\u662f\u5de6\u5173\u8054\u7684\uff0c\u5373\u9996\u9009\u5de6\u4fa7\u7684\u683c\u5f0f\uff0c\u4f8b\u5982\uff0c\u5982\u679c\u53ef\u7528\uff0c<code>-f 22\/17\/18<\/code>\u5c06\u4e0b\u8f7d\u683c\u5f0f22\uff0c\u5426\u5219\u5982\u679c\u53ef\u7528\uff0c\u5b83\u5c06\u4e0b\u8f7d\u683c\u5f0f17\uff0c\u5426\u5219\u5982\u679c\u53ef\u7528\uff0c\u5b83\u5c06\u4e0b\u8f7d\u683c\u5f0f18\uff0c\u5426\u5219\u5b83\u4f1a\u62b1\u6028\u6ca1\u6709\u5408\u9002\u7684\u683c\u5f0f\u53ef\u4f9b\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u4e0b\u8f7d\u540c\u4e00\u89c6\u9891\u7684\u51e0\u79cd\u683c\u5f0f\uff0c\u8bf7\u4f7f\u7528\u9017\u53f7\u4f5c\u4e3a\u5206\u9694\u7b26\uff0c\u4f8b\u5982<code>-f 22,17,18<\/code>\u5c06\u4e0b\u8f7d\u8fd9\u4e09\u79cd\u683c\u5f0f\uff0c\u5f53\u7136\uff0c\u5982\u679c\u5b83\u4eec\u53ef\u7528\u7684\u8bdd\u3002\u6216\u8005\u4e00\u4e2a\u66f4\u590d\u6742\u7684\u793a\u4f8b\u4e0e\u4f18\u5148\u529f\u80fd\u76f8\u7ed3\u5408\uff1a<code>-f 136\/137\/mp4\/bestvideo,140\/m4a\/bestaudio<\/code>\u3002<\/p>\n\n\n\n<p>\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5728\u62ec\u53f7\u4e2d\u653e\u7f6e\u6761\u4ef6\u6765\u8fc7\u6ee4\u89c6\u9891\u683c\u5f0f\uff0c\u4f8b\u5982<code>-f \"best[height=720]\"<\/code>\u201d\uff08\u6216<code>-f \"[filesize&gt;10M]\"<\/code>\u3002<\/p>\n\n\n\n<p>The following numeric meta fields can be used with comparisons&nbsp;<code>&lt;<\/code>,&nbsp;<code>&lt;=<\/code>,&nbsp;<code>&gt;<\/code>,&nbsp;<code>&gt;=<\/code>,&nbsp;<code>=<\/code>&nbsp;(equals),&nbsp;<code>!=<\/code>&nbsp;(not equals):<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>filesize<\/code>\uff1a\u5b57\u8282\u6570\uff0c\u5982\u679c\u63d0\u524d\u77e5\u9053\u7684\u8bdd<\/li><li><code>width<\/code>\uff1a\u89c6\u9891\u5bbd\u5ea6\uff08\u5982\u679c\u5df2\u77e5\uff09<\/li><li><code>height<\/code>\uff1a\u89c6\u9891\u7684\u9ad8\u5ea6\uff0c\u5982\u679c\u5df2\u77e5<\/li><li><code>tbr<\/code>\uff1a\u97f3\u9891\u548c\u89c6\u9891\u7684\u5e73\u5747\u6bd4\u7279\u7387\uff08KBit\/s\uff09<\/li><li><code>abr<\/code>\uff1aKBit\/s\u7684\u5e73\u5747\u97f3\u9891\u6bd4\u7279\u7387<\/li><li><code>vbr<\/code>\uff1aKBit\/s\u7684\u5e73\u5747\u89c6\u9891\u6bd4\u7279\u7387<\/li><li><code>asr<\/code>\uff1a\u8d6b\u5179\u7684\u97f3\u9891\u91c7\u6837\u7387<\/li><li><code>fps<\/code>\uff1a\u5e27\u901f\u7387<\/li><\/ul>\n\n\n\n<p>\u8fd8\u8fc7\u6ee4\u6bd4\u8f83<code>=<\/code>\uff08\u7b49\u4e8e\uff09\u3001<code>^=<\/code>\uff08\u4ece\u5f00\u59cb\uff09\u3001<code>$=<\/code>\uff08\u4ee5\uff09\u3001<code>*=<\/code>\uff08\u5305\u542b\uff09\u548c\u4ee5\u4e0b\u5b57\u7b26\u4e32\u5143\u5b57\u6bb5\u8fdb\u884c\u7b5b\u9009\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>ext<\/code>\uff1a\u6587\u4ef6\u6269\u5c55\u540d<\/li><li><code>acodec<\/code>\uff1a\u4f7f\u7528\u7684\u97f3\u9891\u7f16\u89e3\u7801\u5668\u540d\u79f0<\/li><li><code>vcodec<\/code>\uff1a\u4f7f\u7528\u4e2d\u7684\u89c6\u9891\u7f16\u89e3\u7801\u5668\u540d\u79f0<\/li><li><code>container<\/code>\uff1a\u5bb9\u5668\u683c\u5f0f\u7684\u540d\u79f0<\/li><li><code>protocol<\/code>\uff1a\u7528\u4e8e\u5b9e\u9645\u4e0b\u8f7d\u7684\u5c0f\u5199\u534f\u8bae\uff08<code>http<\/code>\u3001<code>https<\/code>\u3001<code>rtsp<\/code>\u3001<code>rtmp<\/code>\u3001<code>rtmpe<\/code>\u3001<code>mms<\/code>\u3001<code>f4m<\/code>\u3001<code>ism<\/code>\u3001<code>http_dash_segments<\/code>\u3001<code>m3u8<\/code>\u6216<code>m3u8_native<\/code>\uff09<\/li><li><code>format_id<\/code>\uff1a\u683c\u5f0f\u7684\u7b80\u77ed\u63cf\u8ff0<\/li><li><code>language<\/code>\uff1a\u8bed\u8a00\u4ee3\u7801<\/li><\/ul>\n\n\n\n<p>\u4efb\u4f55\u5b57\u7b26\u4e32\u6bd4\u8f83\u90fd\u53ef\u4ee5\u4ee5\u5426\u5b9a\u4e3a\u524d\u7f00<code>!<\/code>\u4e3a\u4e86\u4ea7\u751f\u76f8\u53cd\u7684\u6bd4\u8f83\uff0c\u4f8b\u5982<code>!*=<\/code>\uff08\u4e0d\u5305\u542b\uff09\u3002<\/p>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u4e0a\u8ff0\u4efb\u4f55\u5143\u5b57\u6bb5\u90fd\u4e0d\u80fd\u4fdd\u8bc1\u5b58\u5728\uff0c\u56e0\u4e3a\u8fd9\u5b8c\u5168\u53d6\u51b3\u4e8e\u7279\u5b9a\u63d0\u53d6\u5668\u83b7\u5f97\u7684\u5143\u6570\u636e\uff0c\u5373\u89c6\u9891\u4e3b\u673a\u63d0\u4f9b\u7684\u5143\u6570\u636e\u3002<\/p>\n\n\n\n<p>Formats for which the value is not known are excluded unless you put a question mark (<code>?<\/code>) after the operator. You can combine format filters, so&nbsp;<code>-f \"[height &lt;=? 720][tbr&gt;500]\"<\/code>&nbsp;selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit\/s.<\/p>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528<code>-f &lt;video-format&gt;+&lt;audio-format&gt;<\/code>\uff08\u9700\u8981\u5b89\u88c5ffmpeg\u6216avconvconv\uff09\u5c06\u4e24\u79cd\u683c\u5f0f\u7684\u89c6\u9891\u548c\u97f3\u9891\u5408\u5e76\u5230\u5355\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4f8b\u5982<code>-f bestvideo+bestaudio<\/code>\u5c06\u4e0b\u8f7d\u6700\u4f73\u7684\u89c6\u9891\u4e13\u7528\u683c\u5f0f\uff0c\u6700\u4f73\u4ec5\u97f3\u9891\u683c\u5f0f\uff0c\u5e76\u5c06\u5176\u4e0effmpeg\/avconv\u4e00\u8d77\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>\u683c\u5f0f\u9009\u62e9\u5668\u4e5f\u53ef\u4ee5\u4f7f\u7528\u62ec\u53f7\u8fdb\u884c\u5206\u7ec4\uff0c\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u60f3\u4e0b\u8f7d\u9ad8\u5ea6\u4f4e\u4e8e480\u7684\u6700\u4f73mp4\u548cwebm\u683c\u5f0f\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>-f '(mp4,webm)[height&lt;480]'<\/code>\u3002<\/p>\n\n\n\n<p>\u81ea2015\u5e744\u6708\u5e95\u548c2015.04.26\u7248\u672c\u4ee5\u6765\uff0cyoutube-dl\u4f7f\u7528<code>-f bestvideo+bestaudio\/best<\/code>\u4f5c\u4e3a\u9ed8\u8ba4\u683c\u5f0f\u9009\u62e9\uff08\u89c1<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/issues\/5447\">#5447<\/a>\uff0c<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/issues\/5456\">#5456<\/a>\uff09\u3002\u5982\u679c\u5b89\u88c5\u4e86ffmpeg\u6216avconv\uff0c\u5219\u53ef\u4ee5\u5206\u522b\u4e0b\u8f7d<code>bestvideo<\/code>\u548c<code>bestaudio<\/code>\uff0c\u5e76\u5c06\u5b83\u4eec\u5408\u5e76\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u4ee5\u83b7\u5f97\u6700\u4f73\u7684\u6574\u4f53\u8d28\u91cf\u3002\u5426\u5219\uff0c\u5b83\u4f1a\u56de\u5230<code>best<\/code>\uff0c\u5e76\u5bfc\u81f4\u5c06\u53ef\u7528\u8d28\u91cf\u4e0b\u8f7d\u4e3a\u5355\u4e2a\u6587\u4ef6\u7684\u6700\u4f73\u8d28\u91cf\u3002\u5bf9\u4e8e\u4e0d\u6765\u81eaYouTube\u7684\u89c6\u9891\uff0c\u4e5f\u9700\u8981<code>best<\/code>\uff0c\u56e0\u4e3a\u5b83\u4eec\u6ca1\u6709\u5728\u4e24\u4e2a\u4e0d\u540c\u7684\u6587\u4ef6\u4e2d\u63d0\u4f9b\u97f3\u9891\u548c\u89c6\u9891\u3002\u5982\u679c\u60a8\u53ea\u60f3\u4e0b\u8f7d\u4e00\u4e9bDASH\u683c\u5f0f\uff08\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u5bf9\u83b7\u5f97\u5206\u8fa8\u7387\u9ad8\u4e8e1080p\u7684\u89c6\u9891\u4e0d\u611f\u5174\u8da3\uff09\uff0c\u60a8\u53ef\u4ee5\u6dfb\u52a0<code>-f bestvideo[height&lt;=?1080]+bestaudio\/best<\/code>\u5230\u60a8\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8bf7\u6ce8\u610f\uff0c\u5982\u679c\u60a8\u4f7f\u7528youtube-dl\u6d41\u5f0f\u4f20\u8f93\u5230<code>stdout<\/code>\uff08\u7136\u540e\u6700\u6709\u53ef\u80fd\u5c06\u5176\u4f20\u8f93\u5230\u60a8\u7684\u5a92\u4f53\u64ad\u653e\u5668\uff09\uff0c\u5373\u60a8\u660e\u786e\u6307\u5b9a\u8f93\u51fa\u6a21\u677fas<code>-o -<\/code>\uff0cyoutube-dl\u4ecd\u7136\u4f7f\u7528<code>-f best<\/code>\u683c\u5f0f\u9009\u62e9\uff0c\u4ee5\u4fbf\u7acb\u5373\u5f00\u59cb\u5411\u64ad\u653e\u5668\u4ea4\u4ed8\u5185\u5bb9\uff0c\u800c\u4e0d\u662f\u7b49\u5230<code>bestvideo<\/code>\u548c<code>bestaudio<\/code>\u4e0b\u8f7d\u5e76\u9759\u97f3\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u4fdd\u7559\u65e7\u683c\u5f0f\u9009\u62e9\u884c\u4e3a\uff08\u5728youtube-dl 2015.04.26\u4e4b\u524d\uff09\uff0c\u5373\u60a8\u60f3\u5c06\u53ef\u7528\u7684\u6700\u4f73\u8d28\u91cf\u5a92\u4f53\u4e0b\u8f7d\u4e3a\u5355\u4e2a\u6587\u4ef6\uff0c\u60a8\u5e94\u8be5\u7528<code>-f best<\/code>\u660e\u786e\u6307\u5b9a\u60a8\u7684\u9009\u62e9\u3002\u60a8\u53ef\u80fd\u5e0c\u671b\u5c06\u5176\u6dfb\u52a0\u5230<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#configuration\">\u914d\u7f6e\u6587\u4ef6<\/a>\u4e2d\uff0c\u4ee5\u514d\u6bcf\u6b21\u8fd0\u884cyoutube-dl\u65f6\u90fd\u952e\u5165\u5b83\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#format-selection-examples\"><\/a>\u683c\u5f0f\u9009\u62e9\u793a\u4f8b<\/h4>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u5728Windows\u4e0a\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u53cc\u5f15\u53f7\u800c\u4e0d\u662f\u5355\u5f15\u53f7\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Download best mp4 format available or any other best if no mp4 available\n$ youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]\/best[ext=mp4]\/best'\n\n# Download best format available but no better than 480p\n$ youtube-dl -f 'bestvideo[height&lt;=480]+bestaudio\/best[height&lt;=480]'\n\n# Download best video only format but no bigger than 50 MB\n$ youtube-dl -f 'best[filesize&lt;50M]'\n\n# Download best format available via direct link over HTTP\/HTTPS protocol\n$ youtube-dl -f '(bestvideo+bestaudio\/best)[protocol^=http]'\n\n# Download the best video format and the best audio format without merging them\n$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s'<\/pre>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u5728\u6700\u540e\u4e00\u4e2a\u793a\u4f8b\u4e2d\uff0c\u5efa\u8bae\u4f7f\u7528\u8f93\u51fa\u6a21\u677f\u4f5c\u4e3abestvideo\uff0cbestaudio\u53ef\u80fd\u5177\u6709\u76f8\u540c\u7684\u6587\u4ef6\u540d\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#video-selection-1\"><\/a>\u89c6\u9891\u9009\u62e9<\/h1>\n\n\n\n<p>\u89c6\u9891\u53ef\u4ee5\u4f7f\u7528\u9009\u9879<code>--date<\/code>\u3001<code>--datebefore<\/code>\u6216<code>--dateafter<\/code>\u6309\u4e0a\u4f20\u65e5\u671f\u8fdb\u884c\u8fc7\u6ee4\u3002\u4ed6\u4eec\u63a5\u53d7\u4e24\u79cd\u5f62\u5f0f\u7684\u65e5\u671f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u7edd\u5bf9\u65e5\u671f\uff1a<code>YYYYMMDD<\/code>\u683c\u5f0f\u7684\u65e5\u671f\u3002<\/li><li>\u76f8\u5bf9\u65e5\u671f\uff1a\u683c\u5f0f\u4e2d\u7684\u65e5\u671f<code>(now|today)[+-][0-9](day|week|month|year)(s)?<\/code><\/li><\/ul>\n\n\n\n<p>\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Download only the videos uploaded in the last 6 months\n$ youtube-dl --dateafter now-6months\n\n# Download only the videos uploaded on January 1, 1970\n$ youtube-dl --date 19700101\n\n$ # Download only the videos uploaded in the 200x decade\n$ youtube-dl --dateafter 20000101 --datebefore 20091231<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"faq\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#faq\"><\/a>\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-update-youtube-dl\"><\/a>\u5982\u4f55\u66f4\u65b0youtube-dl\uff1f<\/h3>\n\n\n\n<p>\u5982\u679c\u60a8\u9075\u5faa\u4e86<a href=\"https:\/\/ytdl-org.github.io\/youtube-dl\/download.html\">\u6211\u4eec\u7684\u624b\u52a8\u5b89\u88c5\u8bf4\u660e<\/a>\uff0c\u60a8\u53ea\u9700\u8fd0\u884c<code>youtube-dl -U<\/code>\uff08\u6216\u8005\u5728Linux\u4e0a\u8fd0\u884c<code>sudo youtube-dl -U<\/code>\uff09\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u8fc7pip\uff0c\u4e00\u4e2a\u7b80\u5355\u7684<code>sudo pip install -U youtube-dl<\/code>\u5c31\u8db3\u591f\u66f4\u65b0\u4e86\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528<em>apt-get<\/em>\u6216<em>yum<\/em>\u7b49\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u4e86youtube-dl\uff0c\u8bf7\u4f7f\u7528\u6807\u51c6\u7cfb\u7edf\u66f4\u65b0\u673a\u5236\u8fdb\u884c\u66f4\u65b0\u3002\u8bf7\u6ce8\u610f\uff0c\u5206\u53d1\u5305\u901a\u5e38\u5df2\u8fc7\u65f6\u3002\u6839\u636e\u7ecf\u9a8c\uff0cyoutube-dl\u6bcf\u6708\u81f3\u5c11\u53d1\u5e03\u4e00\u6b21\uff0c\u901a\u5e38\u6bcf\u5468\u751a\u81f3\u6bcf\u5929\u53d1\u5e03\u4e00\u6b21\u3002\u53ea\u9700\u8bbf\u95ee<a href=\"https:\/\/yt-dl.org\/\">https:\/\/yt-dl.org<\/a>\u5373\u53ef\u4e86\u89e3\u5f53\u524d\u7248\u672c\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u5982\u679c\u60a8\u7684\u53d1\u884c\u7248\u670d\u52a1\u4e8e\u4e00\u4e2a\u975e\u5e38\u8fc7\u65f6\u7684\u7248\u672c\uff0c\u6211\u4eecyoutube-dl\u5f00\u53d1\u4eba\u5458\u65e0\u80fd\u4e3a\u529b\u3002\u60a8\u53ef\u4ee5\uff08\u4e5f\u5e94\u8be5\uff09\u5728\u4ed6\u4eec\u7684bugtracker\u6216\u652f\u6301\u8bba\u575b\u4e2d\u5411\u60a8\u7684\u53d1\u884c\u7248\u6295\u8bc9\u3002<\/p>\n\n\n\n<p>\u4f5c\u4e3a\u6700\u540e\u624b\u6bb5\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5378\u8f7d\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u7684\u7248\u672c\uff0c\u5e76\u6309\u7167\u6211\u4eec\u7684\u624b\u52a8\u5b89\u88c5\u8bf4\u660e\u64cd\u4f5c\u3002\u4e3a\u6b64\uff0c\u5220\u9664\u53d1\u884c\u7248\u7684\u8f6f\u4ef6\u5305\uff0c\u5e76\u7528\u4e00\u884c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get remove -y youtube-dl\n<\/pre>\n\n\n\n<p>\u4e4b\u540e\uff0c\u53ea\u9700\u6309\u7167<a href=\"https:\/\/ytdl-org.github.io\/youtube-dl\/download.html\">\u6211\u4eec\u7684\u624b\u52a8\u5b89\u88c5\u8bf4\u660e\u64cd\u4f5c<\/a>\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo wget https:\/\/yt-dl.org\/downloads\/latest\/youtube-dl -O \/usr\/local\/bin\/youtube-dl\nsudo chmod a+rx \/usr\/local\/bin\/youtube-dl\nhash -r\n<\/pre>\n\n\n\n<p>\u540c\u6837\uff0c\u4ece\u90a3\u65f6\u8d77\uff0c\u60a8\u5c06\u80fd\u591f\u4f7f\u7528<code>sudo youtube-dl -U<\/code>\u8fdb\u884c\u66f4\u65b0\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#youtube-dl-is-extremely-slow-to-start-on-windows\"><\/a>youtube-dl\u5728Windows\u4e0a\u542f\u52a8\u901f\u5ea6\u6781\u6162<\/h3>\n\n\n\n<p>\u5728Windows Defender\u8bbe\u7f6e\u4e2d\u6dfb\u52a0<code>youtube-dl.exe<\/code>\u7684\u6587\u4ef6\u6392\u9664\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#im-getting-an-error-unable-to-extract-opengraph-title-on-youtube-playlists\"><\/a>I&#8217;m getting an error&nbsp;<code>Unable to extract OpenGraph title<\/code>&nbsp;on YouTube playlists<\/h3>\n\n\n\n<p>YouTube\u57282014\u5e743\u6708\u53ca\u4ee5\u540e\u66f4\u6539\u4e86\u64ad\u653e\u5217\u8868\u683c\u5f0f\uff0c\u56e0\u6b64\u60a8\u81f3\u5c11\u9700\u8981youtube-dl 2014.07.25\u624d\u80fd\u4e0b\u8f7d\u6240\u6709YouTube\u89c6\u9891\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u5df2\u4f7f\u7528\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u3001pip\u3001setup.py\u6216tarball\u5b89\u88c5\u4e86youtube-dl\uff0c\u8bf7\u4f7f\u7528\u5b83\u8fdb\u884c\u66f4\u65b0\u3002\u8bf7\u6ce8\u610f\uff0cUbuntu\u8f6f\u4ef6\u5305\u4f3c\u4e4e\u4e0d\u518d\u66f4\u65b0\u3002\u7531\u4e8e\u6211\u4eec\u4e0eUbuntu\u65e0\u5173\uff0c\u6211\u4eec\u65e0\u80fd\u4e3a\u529b\u3002\u8bf7\u968f\u65f6\u5411<a href=\"mailto:ubuntu-motu@lists.ubuntu.com?subject=outdated%20version%20of%20youtube-dl\">Ubuntu\u5305\u88c5\u4eba\u5458<\/a><a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/youtube-dl\/+filebug\">\u62a5\u544a\u9519\u8bef<\/a>-\u4ed6\u4eec\u6240\u8981\u505a\u7684\u5c31\u662f\u5c06\u8f6f\u4ef6\u5305\u66f4\u65b0\u5230\u8f83\u65b0\u7684\u7248\u672c\u3002\u8bf7\u53c2\u9605\u4e0a\u6587\u4e86\u89e3\u66f4\u65b0\u65b9\u5f0f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#im-getting-an-error-when-trying-to-use-output-template-error-using-output-template-conflicts-with-using-title-video-id-or-auto-number\"><\/a>\u6211\u5728\u5c1d\u8bd5\u4f7f\u7528\u8f93\u51fa\u6a21\u677f\u65f6\u6536\u5230\u4e00\u4e2a\u9519\u8bef\uff1a<code>error: using output template conflicts with using title, video ID or auto number<\/code><\/h3>\n\n\n\n<p>\u786e\u4fdd\u60a8\u6ca1\u6709\u5c06<code>-o<\/code>\u4e0e\u547d\u4ee4\u884c\u6216\u914d\u7f6e\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7684\u4efb\u4f55\u9009\u9879<code>-t<\/code>\u3001<code>--title<\/code>\u3001<code>--id<\/code>\u3001<code>-A<\/code>\u6216<code>--auto-number<\/code>\u3002\u79fb\u9664\u540e\u8005\uff08\u5982\u679c\u6709\u7684\u8bdd\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#do-i-always-have-to-pass--citw\"><\/a>\u6211\u603b\u662f\u5fc5\u987b\u901a\u8fc7<code>-citw<\/code>\u5417\uff1f<\/h3>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cyoutube-dl\u6253\u7b97\u62e5\u6709\u6700\u4f73\u9009\u9879\uff08\u987a\u4fbf\u8bf4\u4e00\u53e5\uff0c\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u4ee4\u4eba\u4fe1\u670d\u7684\u6848\u4f8b\uff0c\u8ba4\u4e3a\u8fd9\u4e9b\u9009\u9879\u5e94\u8be5\u6709\u6240\u4e0d\u540c\uff0c<a href=\"https:\/\/yt-dl.org\/bug\">\u8bf7\u5728\u89e3\u91ca\u7684\u60c5\u51b5\u4e0b\u63d0\u4ea4\u95ee\u9898<\/a>\uff09\u3002\u56e0\u6b64\uff0c\u4ece\u7f51\u9875\u4e0a\u590d\u5236\u957f\u9009\u9879\u5b57\u7b26\u4e32\u662f\u4e0d\u5fc5\u8981\u7684\uff0c\u6709\u65f6\u4e5f\u662f\u6709\u5bb3\u7684\u3002\u7279\u522b\u662f\uff0c<code>-citw<\/code>\u4e2d\u552f\u4e00\u7ecf\u5e38\u6709\u7528\u7684\u9009\u9879\u662f<code>-i<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#can-you-please-put-the--b-option-back\"><\/a>\u4f60\u80fd\u628a<code>-b<\/code>\u9009\u9879\u653e\u56de\u53bb\u5417\uff1f<\/h3>\n\n\n\n<p>\u5927\u591a\u6570\u63d0\u51fa\u8fd9\u4e2a\u95ee\u9898\u7684\u4eba\u4e0d\u77e5\u9053youtube-dl\u73b0\u5728\u9ed8\u8ba4\u4e0b\u8f7dYouTube\u62a5\u544a\u7684\u6700\u9ad8\u53ef\u7528\u8d28\u91cf\uff0c\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u662f1080p\u6216720p\uff0c\u56e0\u6b64\u60a8\u4e0d\u518d\u9700\u8981<code>-b<\/code>\u9009\u9879\u3002\u5bf9\u4e8e\u67d0\u4e9b\u7279\u5b9a\u89c6\u9891\uff0c\u4e5f\u8bb8YouTube\u4e0d\u4f1a\u62a5\u544a\u5b83\u4eec\u4ee5\u60a8\u611f\u5174\u8da3\u7684\u7279\u5b9a\u9ad8\u8d28\u91cf\u683c\u5f0f\u63d0\u4f9b\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ea\u9700\u4f7f\u7528<code>-f<\/code>\u9009\u9879\u8bf7\u6c42\u5b83\uff0cyoutube-dl\u5c06\u5c1d\u8bd5\u4e0b\u8f7d\u5b83\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#i-get-http-error-402-when-trying-to-download-a-video-whats-this\"><\/a>\u6211\u5728\u5c1d\u8bd5\u4e0b\u8f7d\u89c6\u9891\u65f6\u6536\u5230HTTP\u9519\u8bef402\u3002\u8fd9\u662f\u4ec0\u4e48\uff1f<\/h3>\n\n\n\n<p>\u663e\u7136\uff0c\u5982\u679c\u60a8\u4e0b\u8f7d\u592a\u591a\uff0cYouTube\u8981\u6c42\u60a8\u901a\u8fc7\u9a8c\u8bc1\u7801\u6d4b\u8bd5\u3002\u6211\u4eec<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/issues\/154\">\u6b63\u5728\u8003\u8651\u63d0\u4f9b\u4e00\u79cd\u65b9\u6cd5\u6765\u5e2e\u52a9\u60a8\u89e3\u51b3\u9a8c\u8bc1\u7801<\/a>\uff0c\u4f46\u76ee\u524d\uff0c\u60a8\u7684\u6700\u4f73\u65b9\u6848\u662f\u5c06\u7f51\u9875\u6d4f\u89c8\u5668\u6307\u5411youtube URL\uff0c\u89e3\u51b3\u9a8c\u8bc1\u7801\uff0c\u5e76\u91cd\u65b0\u542f\u52a8youtube-dl\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#do-i-need-any-other-programs\"><\/a>\u6211\u9700\u8981\u5176\u4ed6\u7a0b\u5e8f\u5417\uff1f<\/h3>\n\n\n\n<p>youtube-dl\u5728\u5927\u591a\u6570\u7f51\u7ad9\u4e0a\u72ec\u7acb\u5de5\u4f5c\u6b63\u5e38\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u60f3\u8f6c\u6362\u89c6\u9891\/\u97f3\u9891\uff0c\u60a8\u9700\u8981<a href=\"https:\/\/libav.org\/\">avconv<\/a>\u6216<a href=\"https:\/\/www.ffmpeg.org\/\">ffmpeg<\/a>\u3002\u5728\u67d0\u4e9b\u7f51\u7ad9\u4e0a\uff0c\u6700\u503c\u5f97\u6ce8\u610f\u7684\u662fYouTube\uff0c\u89c6\u9891\u53ef\u4ee5\u5728\u6ca1\u6709\u58f0\u97f3\u7684\u60c5\u51b5\u4e0b\u4ee5\u66f4\u9ad8\u8d28\u91cf\u7684\u683c\u5f0f\u68c0\u7d22\u3002youtube-dl\u5c06\u68c0\u6d4b\u662f\u5426\u5b58\u5728avconv\/ffmpeg\uff0c\u5e76\u81ea\u52a8\u9009\u62e9\u6700\u4f73\u9009\u9879\u3002<\/p>\n\n\n\n<p>\u53ea\u6709\u5b89\u88c5<a href=\"https:\/\/rtmpdump.mplayerhq.hu\/\">rtmpdump<\/a>\u65f6\uff0c\u624d\u80fd\u4e0b\u8f7d\u901a\u8fc7RTMP\u534f\u8bae\u6d41\u5f0f\u4f20\u8f93\u7684\u89c6\u9891\u6216\u89c6\u9891\u683c\u5f0f\u3002\u4e0b\u8f7d\u5f69\u4fe1\u548cRTSP\u89c6\u9891\u9700\u8981\u5b89\u88c5<a href=\"https:\/\/mplayerhq.hu\/\">mplayer<\/a>\u6216<a href=\"https:\/\/mpv.io\/\">mpv<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#i-have-downloaded-a-video-but-how-can-i-play-it\"><\/a>\u6211\u5df2\u7ecf\u4e0b\u8f7d\u4e86\u4e00\u4e2a\u89c6\u9891\uff0c\u4f46\u6211\u5982\u4f55\u64ad\u653e\u5b83\uff1f<\/h3>\n\n\n\n<p>\u89c6\u9891\u5b8c\u5168\u4e0b\u8f7d\u540e\uff0c\u8bf7\u4f7f\u7528\u4efb\u4f55\u89c6\u9891\u64ad\u653e\u5668\uff0c\u5982<a href=\"https:\/\/mpv.io\/\">mpv<\/a>\u3001<a href=\"https:\/\/www.videolan.org\/\">vlc<\/a>\u6216<a href=\"https:\/\/www.mplayerhq.hu\/\">mplayer<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#i-extracted-a-video-url-with--g-but-it-does-not-play-on-another-machine--in-my-web-browser\"><\/a>\u6211\u7528<code>-g<\/code>\u63d0\u53d6\u4e86\u4e00\u4e2a\u89c6\u9891URL\uff0c\u4f46\u5b83\u4e0d\u4f1a\u5728\u53e6\u4e00\u53f0\u673a\u5668\/\u6211\u7684\u7f51\u9875\u6d4f\u89c8\u5668\u4e2d\u64ad\u653e\u3002<\/h3>\n\n\n\n<p>\u8fd9\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u53d6\u51b3\u4e8e\u670d\u52a1\u3002\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u5bf9\u89c6\u9891\u7684\u8bf7\u6c42\uff08\u4e0b\u8f7d\/\u64ad\u653e\u5b83\uff09\u5fc5\u987b\u6765\u81ea\u76f8\u540c\u7684IP\u5730\u5740\u548c\u76f8\u540c\u7684cookie\u548c\/\u6216HTTP\u6807\u5934\u3002\u4f7f\u7528<code>--cookies<\/code>\u9009\u9879\u5c06\u6240\u9700\u7684cookie\u5199\u5165\u6587\u4ef6\u4e2d\uff0c\u5e76\u5efa\u8bae\u60a8\u7684\u4e0b\u8f7d\u5668\u4ece\u8be5\u6587\u4ef6\u4e2d\u8bfb\u53d6cookie\u3002\u4e00\u4e9b\u7f51\u7ad9\u8fd8\u9700\u8981\u4f7f\u7528\u901a\u7528\u7528\u6237\u4ee3\u7406\uff0c\u4f7f\u7528<code>--dump-user-agent<\/code>\u67e5\u770byoutube-dl\u4f7f\u7528\u7684\u4ee3\u7406\u3002\u60a8\u8fd8\u53ef\u4ee5\u4ece\u4f7f\u7528<code>--dump-json<\/code>\u83b7\u5f97\u7684JSON\u8f93\u51fa\u4e2d\u83b7\u53d6\u5fc5\u8981\u7684cookie\u548cHTTP\u5934\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528IPv6\u53ef\u80fd\u662f\u6709\u76ca\u7684\uff1b\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u9650\u5236\u4ec5\u9002\u7528\u4e8eIPv4\u3002\u4e00\u4e9b\u670d\u52a1\uff08\u6709\u65f6\u4ec5\u9002\u7528\u4e8e\u89c6\u9891\u7684\u5b50\u96c6\uff09\u4e0d\u4f1a\u901a\u8fc7IP\u5730\u5740\u3001cookie\u6216\u7528\u6237\u4ee3\u7406\u9650\u5236\u89c6\u9891URL\uff0c\u4f46\u8fd9\u4e9b\u662f\u4f8b\u5916\uff0c\u800c\u4e0d\u662f\u89c4\u5219\u3002<\/p>\n\n\n\n<p>\u8bf7\u8bb0\u4f4f\uff0c\u5305\u62ecRTMP\u5728\u5185\u7684\u6d4f\u89c8\u5668\u5f00\u7bb1\u5373\u7528\u6d4f\u89c8\u5668<strong>\u4e0d<\/strong>\u652f\u6301\u67d0\u4e9bURL\u534f\u8bae\u3002\u5982\u679c\u60a8\u6b63\u5728\u4f7f\u7528<code>-g<\/code>\uff0c\u60a8\u81ea\u5df1\u7684\u4e0b\u8f7d\u5668\u4e5f\u5fc5\u987b\u652f\u6301\u8fd9\u4e9b\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u5728\u4e0d\u8fd0\u884cyoutube-dl\u7684\u673a\u5668\u4e0a\u64ad\u653e\u89c6\u9891\uff0c\u60a8\u53ef\u4ee5\u4ece\u8fd0\u884cyoutube-dl\u7684\u673a\u5668\u4e2d\u8f6c\u64ad\u89c6\u9891\u5185\u5bb9\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528<code>-o -<\/code>\u8ba9youtube-dl\u5c06\u89c6\u9891\u6d41\u5f0f\u4f20\u8f93\u5230stdout\uff0c\u6216\u8005\u7b80\u5355\u5730\u5141\u8bb8\u64ad\u653e\u5668\u4f9d\u6b21\u4e0b\u8f7dyoutube-dl\u7f16\u5199\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#error-no-fmt_url_map-or-conn-information-found-in-video-info\"><\/a>\u9519\u8bef\uff1a\u5728\u89c6\u9891\u4fe1\u606f\u4e2d\u627e\u4e0d\u5230fmt_url_map\u6216conn\u4fe1\u606f<\/h3>\n\n\n\n<p>YouTube\u5df2\u4e8e2011\u5e747\u6708\u5207\u6362\u5230\u65b0\u7684\u89c6\u9891\u4fe1\u606f\u683c\u5f0f\uff0c\u65e7\u7248\u672c\u7684youtube-dl\u4e0d\u652f\u6301\u8be5\u683c\u5f0f\u3002\u6709\u5173\u5982\u4f55\u66f4\u65b0youtube-dl\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-update-youtube-dl\">\u4e0a\u6587<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#error-unable-to-download-video\"><\/a>\u9519\u8bef\uff1a\u65e0\u6cd5\u4e0b\u8f7d\u89c6\u9891<\/h3>\n\n\n\n<p>\u81ea2012\u5e749\u6708\u4ee5\u6765\uff0cYouTube\u9700\u8981\u989d\u5916\u7684\u7b7e\u540d\uff0c\u800c\u65e7\u7248\u672c\u7684youtube-dl\u4e0d\u652f\u6301\u3002\u6709\u5173\u5982\u4f55\u66f4\u65b0youtube-dl\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-update-youtube-dl\">\u4e0a\u6587<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command\"><\/a>\u89c6\u9891URL\u5305\u542b\u4e00\u4e2a\u5b89\u57f9\u6570\uff0c\u6211\u6b63\u5728\u5f97\u5230\u4e00\u4e9b\u5947\u602a\u7684\u8f93\u51fa<code>[1] 2839<\/code>\u6216<code>'v' is not recognized as an internal or external command<\/code><\/h3>\n\n\n\n<p>\u8fd9\u5b9e\u9645\u4e0a\u662f\u4f60\u5916\u58f3\u7684\u8f93\u51fa\u3002\u7531\u4e8eampersand\u662f\u7279\u6b8a\u7684shell\u5b57\u7b26\u4e4b\u4e00\uff0c\u56e0\u6b64shell\u4f1a\u5bf9\u5176\u8fdb\u884c\u89e3\u91ca\uff0c\u963b\u6b62\u60a8\u5c06\u6574\u4e2aURL\u4f20\u9012\u7ed9youtube-dl\u3002\u8981\u7981\u7528shell\u89e3\u91ca\u5b89\u57f9\u6570\uff08\u6216\u4efb\u4f55\u5176\u4ed6\u7279\u6b8a\u5b57\u7b26\uff09\uff0c\u60a8\u5fc5\u987b\u5c06\u6574\u4e2aURL\u653e\u5728\u5f15\u53f7\u4e2d\u6216\u4f7f\u7528\u53cd\u659c\u6760\u8f6c\u4e49\u5b83\u4eec\uff08\u54ea\u79cd\u65b9\u6cd5\u5c06\u6839\u636e\u60a8\u7684shell\u8d77\u4f5c\u7528\uff09\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u7684URL\u662f<a href=\"https:\/\/www.youtube.com\/watch?t=4&amp;v=BaW_jenozKc\">https:\/\/www.youtube.com\/watch\uff1ft=4&amp;v=BaW_jenozKc&nbsp;<\/a>\u60a8\u6700\u7ec8\u5e94\u8be5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<p><code>youtube-dl 'https:\/\/www.youtube.com\/watch?t=4&amp;v=BaW_jenozKc'<\/code><\/p>\n\n\n\n<p>\u5965\u52d2\u5188\u5dde<\/p>\n\n\n\n<p><code>youtube-dl https:\/\/www.youtube.com\/watch?t=4\\&amp;v=BaW_jenozKc<\/code><\/p>\n\n\n\n<p>\u5bf9\u4e8eWindows\uff0c\u60a8\u5fc5\u987b\u4f7f\u7528\u53cc\u5f15\u53f7\uff1a<\/p>\n\n\n\n<p><code>youtube-dl \"https:\/\/www.youtube.com\/watch?t=4&amp;v=BaW_jenozKc\"<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#extractorerror-could-not-find-js-function-uof\"><\/a>ExtractorError\uff1a\u627e\u4e0d\u5230JS\u51fd\u6570u&#8217;OF&#8217;<\/h3>\n\n\n\n<p>2015\u5e742\u6708\uff0c\u65b0\u7684YouTube\u64ad\u653e\u5668\u5728\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u4e00\u4e2a\u5b57\u7b26\u5e8f\u5217\uff0c\u8be5\u5b57\u7b26\u4e32\u88ab\u65e7\u7248\u672c\u7684youtube-dl\u8bef\u89e3\u3002\u6709\u5173\u5982\u4f55\u66f4\u65b0youtube-dl\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-update-youtube-dl\">\u4e0a\u6587<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#http-error-429-too-many-requests-or-402-payment-required\"><\/a>HTTP\u9519\u8bef429\uff1a\u8bf7\u6c42\u592a\u591a\u6216402\uff1a\u9700\u8981\u4ed8\u6b3e<\/h3>\n\n\n\n<p>These two error codes indicate that the service is blocking your IP address because of overuse. Usually this is a soft block meaning that you can gain access again after solving CAPTCHA. Just open a browser and solve a CAPTCHA the service suggests you and after that&nbsp;<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-pass-cookies-to-youtube-dl\">pass cookies<\/a>&nbsp;to youtube-dl. Note that if your machine has multiple external IPs then you should also pass exactly the same IP you&#8217;ve used for solving CAPTCHA with&nbsp;<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#network-options\"><code>--source-address<\/code><\/a>. Also you may need to pass a&nbsp;<code>User-Agent<\/code>&nbsp;HTTP header of your browser with&nbsp;<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#workarounds\"><code>--user-agent<\/code><\/a>.<\/p>\n\n\n\n<p>\u5982\u679c\u4e0d\u662f\u8fd9\u6837\uff08\u6ca1\u6709\u5efa\u8bae\u901a\u8fc7\u670d\u52a1\u89e3\u51b3\u9a8c\u8bc1\u7801\uff09\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u8054\u7cfb\u670d\u52a1\u5e76\u8981\u6c42\u4ed6\u4eec\u53d6\u6d88\u963b\u6b62\u60a8\u7684IP\u5730\u5740\uff0c\u6216\u8005\u2014\u2014\u5982\u679c\u60a8\u5df2\u7ecf\u83b7\u5f97\u4e86\u767d\u540d\u5355\u7684IP\u5730\u5740\u2014\u2014\u4f7f\u7528<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#network-options\"><code>--proxy<\/code>\u6216<code>--source-address<\/code>\u9009\u9879<\/a>\u6765\u9009\u62e9\u53e6\u4e00\u4e2aIP\u5730\u5740\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#syntaxerror-non-ascii-character\"><\/a>\u8bed\u6cd5\u9519\u8bef\uff1a\u975eASCII\u5b57\u7b26<\/h3>\n\n\n\n<p>\u9519\u8bef<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">File \"youtube-dl\", line 2\nSyntaxError: Non-ASCII character '\\x93' ...\n<\/pre>\n\n\n\n<p>\u610f\u5473\u7740\u60a8\u4f7f\u7528\u7684\u662f\u8fc7\u65f6\u7684Python\u7248\u672c\u3002\u8bf7\u66f4\u65b0\u5230Python 2.6\u62162.7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#what-is-this-binary-file-where-has-the-code-gone\"><\/a>\u8fd9\u4e2a\u4e8c\u8fdb\u5236\u6587\u4ef6\u662f\u4ec0\u4e48\uff1f\u4ee3\u7801\u53bb\u54ea\u4e86\uff1f<\/h3>\n\n\n\n<p>\u81ea2012\u5e746\u6708\uff08<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/issues\/342\">#342<\/a>\uff09\u4ee5\u6765\uff0cyoutube-dl\u88ab\u6253\u5305\u4e3a\u53ef\u6267\u884c\u7684zip\u6587\u4ef6\uff0c\u53ea\u9700\u89e3\u538b\u7f29\uff08\u53ef\u80fd\u9700\u8981\u5148\u5728\u67d0\u4e9b\u7cfb\u7edf\u4e0a\u91cd\u547d\u540d\u4e3a<code>youtube-dl.zip<\/code>\uff09\u6216\u514b\u9686git\u5b58\u50a8\u5e93\uff0c\u5982\u4e0a\u6240\u8ff0\u3002\u5982\u679c\u60a8\u4fee\u6539\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u6267\u884c<code>__main__.py<\/code>\u6587\u4ef6\u6765\u8fd0\u884c\u5b83\u3002\u8981\u91cd\u65b0\u7f16\u8bd1\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8bf7\u8fd0\u884c<code>make youtube-dl<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#the-exe-throws-an-error-due-to-missing-msvcr100dll\"><\/a>\u524d\u4efb\u56e0\u4e22\u5931\u800c\u629b\u51fa\u9519\u8bef<code>MSVCR100.dll<\/code><\/h3>\n\n\n\n<p>\u8981\u8fd0\u884cexe\uff0c\u60a8\u9700\u8981\u9996\u5148\u5b89\u88c5<a href=\"https:\/\/download.microsoft.com\/download\/1\/6\/5\/165255E7-1014-4D0A-B094-B6A430A6BFFC\/vcredist_x86.exe\">Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package\uff08x86\uff09\u3002<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#on-windows-how-should-i-set-up-ffmpeg-and-youtube-dl-where-should-i-put-the-exe-files\"><\/a>\u5728Windows\u4e0a\uff0c\u6211\u5e94\u8be5\u5982\u4f55\u8bbe\u7f6effmpeg\u548cyoutube-dl\uff1f\u6211\u5e94\u8be5\u628aexe\u6587\u4ef6\u653e\u5728\u54ea\u91cc\uff1f<\/h3>\n\n\n\n<p>\u5982\u679c\u60a8\u5c06youtube-dl\u548cffmpeg\u653e\u5728\u8fd0\u884c\u547d\u4ee4\u7684\u540c\u4e00\u76ee\u5f55\u4e2d\uff0c\u5b83\u4f1a\u8d77\u4f5c\u7528\uff0c\u4f46\u8fd9\u76f8\u5f53\u9ebb\u70e6\u3002<\/p>\n\n\n\n<p>\u8981\u4f7f\u4e0d\u540c\u7684\u76ee\u5f55\u5de5\u4f5c-\u65e0\u8bba\u662f\u4e3affmpeg\uff0c\u8fd8\u662fyoutube-dl\uff0c\u8fd8\u662f\u4e24\u8005\u517c\u800c\u6709\u4e4b-\u53ea\u9700\u521b\u5efa\u76ee\u5f55\uff08\u4f8b\u5982\uff0c<code>C:\\bin<\/code>\uff0c\u6216<code>C:\\Users\\&lt;User name&gt;\\bin<\/code>\uff09\uff0c\u5c06\u6240\u6709\u53ef\u6267\u884c\u6587\u4ef6\u76f4\u63a5\u653e\u5728\u90a3\u91cc\uff0c\u7136\u540e<a href=\"https:\/\/www.java.com\/en\/download\/help\/path.xml\">\u5c06PATH\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a<\/a>\u5305\u542b\u8be5\u76ee\u5f55\u3002<\/p>\n\n\n\n<p>\u4ece\u90a3\u65f6\u8d77\uff0c\u91cd\u65b0\u542f\u52a8shell\u540e\uff0c\u65e0\u8bba\u60a8\u4f4d\u4e8e\u54ea\u4e2a\u76ee\u5f55\uff0c\u60a8\u90fd\u53ef\u4ee5\u901a\u8fc7\u952e\u5165<code>youtube-dl<\/code>\u6216<code>ffmpeg<\/code>\u6765\u8bbf\u95eeyoutube-dl\u548cffmpeg\uff08youtube-dl\u5c06\u80fd\u591f\u627e\u5230ffmpeg\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-put-downloads-into-a-specific-folder\"><\/a>\u5982\u4f55\u5c06\u4e0b\u8f7d\u653e\u5165\u7279\u5b9a\u7684\u6587\u4ef6\u5939\uff1f<\/h3>\n\n\n\n<p>\u4f7f\u7528<code>-o<\/code>\u6307\u5b9a<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#output-template\">\u8f93\u51fa\u6a21\u677f<\/a>\uff0c\u4f8b\u5982<code>-o \"\/home\/user\/videos\/%(title)s-%(id)s.%(ext)s\"<\/code>\u5982\u679c\u60a8\u5e0c\u671b\u6240\u6709\u4e0b\u8f7d\u90fd\u4f7f\u7528\u8fd9\u4e2a\uff0c\u8bf7\u5c06\u8be5\u9009\u9879\u653e\u5165\u60a8\u7684<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#configuration\">\u914d\u7f6e\u6587\u4ef6\u4e2d<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-download-a-video-starting-with-a--\"><\/a>\u5982\u4f55\u4e0b\u8f7d\u4ee5<code>-<\/code>\u5f00\u5934\u7684\u89c6\u9891\uff1f<\/h3>\n\n\n\n<p>\u8981\u4e48\u5148\u4e8e<code>https:\/\/www.youtube.com\/watch?v=<\/code>\u6216\u5c06ID\u4e0e\u9009\u9879\u5206\u5f00<code>--<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">youtube-dl -- -wNyEUrxzFU\nyoutube-dl \"https:\/\/www.youtube.com\/watch?v=-wNyEUrxzFU\"\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-pass-cookies-to-youtube-dl\"><\/a>\u5982\u4f55\u5c06cookie\u4f20\u9012\u5230youtube-dl\uff1f<\/h3>\n\n\n\n<p>\u4f7f\u7528<code>--cookies<\/code>\u9009\u9879\uff0c\u4f8b\u5982<code>--cookies \/path\/to\/cookies\/file.txt<\/code>\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u4ece\u6d4f\u89c8\u5668\u4e2d\u63d0\u53d6cookie\uff0c\u8bf7\u4f7f\u7528\u4efb\u4f55\u7b26\u5408\u8981\u6c42\u7684\u6d4f\u89c8\u5668\u6269\u5c55\u6765\u5bfc\u51facookie\u3002\u4f8b\u5982\uff0c<a href=\"https:\/\/chrome.google.com\/webstore\/detail\/get-cookiestxt\/bgaddhkoddajcdgocldbbfleckgcbcid\/\">\u83b7\u53d6cookies.txt<\/a>\uff08\u9002\u7528\u4e8eChrome\uff09\u6216<a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/cookies-txt\/\">cookies.txt<\/a>\uff08\u9002\u7528\u4e8eFirefox\uff09\u3002<\/p>\n\n\n\n<p>Note that the cookies file must be in Mozilla\/Netscape format and the first line of the cookies file must be either&nbsp;<code># HTTP Cookie File<\/code>&nbsp;or&nbsp;<code># Netscape HTTP Cookie File<\/code>. Make sure you have correct&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Newline\">newline format<\/a>&nbsp;in the cookies file and convert newlines if necessary to correspond with your OS, namely&nbsp;<code>CRLF<\/code>&nbsp;(<code>\\r\\n<\/code>) for Windows and&nbsp;<code>LF<\/code>&nbsp;(<code>\\n<\/code>) for Unix and Unix-like systems (Linux, macOS, etc.).&nbsp;<code>HTTP Error 400: Bad Request<\/code>&nbsp;when using&nbsp;<code>--cookies<\/code>&nbsp;is a good sign of invalid newline format.<\/p>\n\n\n\n<p>\u5f53\u7279\u5b9a\u63d0\u53d6\u5668\u6ca1\u6709\u663e\u5f0f\u5b9e\u73b0\u767b\u5f55\u65f6\uff0c\u5c06cookie\u4f20\u9012\u5230youtube-dl\u662f\u89e3\u51b3\u767b\u5f55\u7684\u597d\u65b9\u6cd5\u3002\u53e6\u4e00\u4e2a\u7528\u4f8b\u662f\u7ed5\u8fc7<a href=\"https:\/\/en.wikipedia.org\/wiki\/CAPTCHA\">\u9a8c\u8bc1\u7801<\/a>\uff0c\u4e00\u4e9b\u7f51\u7ad9\u8981\u6c42\u60a8\u5728\u7279\u5b9a\u60c5\u51b5\u4e0b\u89e3\u51b3\u624d\u80fd\u8bbf\u95ee\uff08\u4f8b\u5982YouTube\uff0cCloudFlare\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-stream-directly-to-media-player\"><\/a>\u5982\u4f55\u76f4\u63a5\u6d41\u5f0f\u4f20\u8f93\u5230\u5a92\u4f53\u64ad\u653e\u5668\uff1f<\/h3>\n\n\n\n<p>\u60a8\u9996\u5148\u9700\u8981\u544a\u8bc9youtube-dl\u4f7f\u7528<code>-o -<\/code>\u5c06\u5a92\u4f53\u6d41\u5f0f\u4f20\u8f93\u5230stdout\uff0c\u8fd8\u9700\u8981\u544a\u8bc9\u60a8\u7684\u5a92\u4f53\u64ad\u653e\u5668\u4ecestdin\u9605\u8bfb\uff08\u5b83\u5fc5\u987b\u80fd\u591f\u8fdb\u884c\u6d41\u5a92\u4f53\uff09\uff0c\u7136\u540e\u5c06\u524d\u8005\u8fde\u63a5\u5230\u540e\u8005\u3002\u4f8b\u5982\uff0c\u6d41\u5f0f\u4f20\u8f93\u5230<a href=\"https:\/\/www.videolan.org\/\">vlc<\/a>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5b9e\u73b0\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">youtube-dl -o - \"https:\/\/www.youtube.com\/watch?v=BaW_jenozKcj\" | vlc -\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-do-i-download-only-new-videos-from-a-playlist\"><\/a>\u6211\u5982\u4f55\u53ea\u4ece\u64ad\u653e\u5217\u8868\u4e2d\u4e0b\u8f7d\u65b0\u89c6\u9891\uff1f<\/h3>\n\n\n\n<p>\u4f7f\u7528\u4e0b\u8f7d\u5b58\u6863\u529f\u80fd\u3002\u4f7f\u7528\u6b64\u529f\u80fd\uff0c\u60a8\u6700\u521d\u5e94\u8be5\u4f7f\u7528<code>--download-archive \/path\/to\/download\/archive\/file.txt<\/code>\u4e0b\u8f7d\u5b8c\u6574\u7684\u64ad\u653e\u5217\u8868\uff0c\u8be5\u64ad\u653e\u5217\u8868\u5c06\u8bb0\u5f55\u7279\u6b8a\u6587\u4ef6\u4e2d\u6240\u6709\u89c6\u9891\u7684\u6807\u8bc6\u7b26\u3002\u6bcf\u6b21\u4f7f\u7528\u76f8\u540c\u7684<code>--download-archive<\/code>\u8fdb\u884c\u540e\u7eed\u8fd0\u884c\uff0c\u5c06\u4ec5\u4e0b\u8f7d\u65b0\u89c6\u9891\uff0c\u5e76\u8df3\u8fc7\u4e4b\u524d\u4e0b\u8f7d\u8fc7\u7684\u6240\u6709\u89c6\u9891\u3002\u8bf7\u6ce8\u610f\uff0c\u6587\u4ef6\u4e2d\u4ec5\u8bb0\u5f55\u6210\u529f\u7684\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u4e00\u5f00\u59cb\uff0c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">youtube-dl --download-archive archive.txt \"https:\/\/www.youtube.com\/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\"\n<\/pre>\n\n\n\n<p>\u5c06\u4e0b\u8f7d\u5b8c\u6574\u7684<code>PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re<\/code>\u64ad\u653e\u5217\u8868\u5e76\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6<code>archive.txt<\/code>\u3002\u6bcf\u6b21\u540e\u7eed\u8fd0\u884c\u53ea\u4f1a\u4e0b\u8f7d\u65b0\u89c6\u9891\uff08\u5982\u679c\u6709\u7684\u8bdd\uff09\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">youtube-dl --download-archive archive.txt \"https:\/\/www.youtube.com\/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re\"\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#should-i-add---hls-prefer-native-into-my-config\"><\/a>\u6211\u5e94\u8be5\u5c06<code>--hls-prefer-native<\/code>\u6dfb\u52a0\u5230\u6211\u7684\u914d\u7f6e\u4e2d\u5417\uff1f<\/h3>\n\n\n\n<p>\u5f53youtube-dl\u68c0\u6d4b\u5230HLS\u89c6\u9891\u65f6\uff0c\u5b83\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u4e0b\u8f7d\u5668\u6216ffmpeg\u4e0b\u8f7d\u3002\u7531\u4e8e\u8bb8\u591aHLS\u6d41\u7565\u6709\u65e0\u6548\uff0cffmpeg\/youtube-dl\u6bcf\u4e2a\u6d41\u90fd\u6bd4\u53e6\u4e00\u4e2a\u66f4\u597d\u5730\u5904\u7406\u4e00\u4e9b\u65e0\u6548\u6848\u4f8b\uff0c\u56e0\u6b64\u5982\u679c\u9700\u8981\uff0c\u53ef\u4ee5\u9009\u62e9\u5207\u6362\u4e0b\u8f7d\u5668\u3002<\/p>\n\n\n\n<p>\u5f53youtube-dl\u77e5\u9053\u4e00\u4e2a\u7279\u5b9a\u7684\u4e0b\u8f7d\u5668\u5bf9\u7ed9\u5b9a\u7684\u7f51\u7ad9\u6548\u679c\u66f4\u597d\u65f6\uff0c\u5c06\u9009\u62e9\u8be5\u4e0b\u8f7d\u5668\u3002\u5426\u5219\uff0cyoutube-dl\u5c06\u9009\u62e9\u6700\u4f73\u7684\u4e0b\u8f7d\u5668\u8fdb\u884c\u4e00\u822c\u517c\u5bb9\u6027\uff0c\u76ee\u524d\u6070\u597d\u662fffmpeg\u3002\u968f\u7740\u5185\u7f6e\u4e0b\u8f7d\u5668\u548c\/\u6216ffmpeg\u7684\u6539\u8fdb\uff0c\u6b64\u9009\u62e9\u53ef\u80fd\u4f1a\u5728\u672a\u6765\u7248\u672c\u7684youtube-dl\u4e2d\u53d1\u751f\u53d8\u5316\u3002<\/p>\n\n\n\n<p>\u7279\u522b\u662f\uff0c\u901a\u7528\u63d0\u53d6\u5668\uff08\u5f53\u60a8\u7684\u7f51\u7ad9\u4e0d\u5728<a href=\"https:\/\/ytdl-org.github.io\/youtube-dl\/supportedsites.html\">youtube-dl\u652f\u6301\u7684\u7f51\u7ad9\u5217\u8868\u4e2d<\/a>\u65f6\u4f7f\u7528\uff09\u4e0d\u80fd\u5f3a\u5236\u6307\u5b9a\u4e00\u4e2a\u7279\u5b9a\u7684\u4e0b\u8f7d\u5668\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u5c06<code>--hls-prefer-native<\/code>\u6216<code>--hls-prefer-ffmpeg<\/code>\u653e\u5165\u914d\u7f6e\u4e2d\uff0c\u5219\u4e0d\u540c\u7684\u89c6\u9891\u5b50\u96c6\u5c06\u65e0\u6cd5\u6b63\u786e\u4e0b\u8f7d\u3002\u76f8\u53cd\uff0c\u6700\u597d<a href=\"https:\/\/yt-dl.org\/bug\">\u63d0\u4ea4\u95ee\u9898<\/a>\u6216\u62c9\u53d6\u8bf7\u6c42\uff0c\u8be6\u7ec6\u8bf4\u660e\u4e86\u4e3a\u4ec0\u4e48\u672c\u673a\u6216ffmpeg HLS\u4e0b\u8f7d\u5668\u662f\u60a8\u7528\u4f8b\u7684\u66f4\u597d\u9009\u62e9\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free\"><\/a>\u4f60\u80fd\u6dfb\u52a0\u5bf9\u8fd9\u4e2a\u52a8\u6f2b\u89c6\u9891\u7f51\u7ad9\u6216\u514d\u8d39\u663e\u793a\u5f53\u524d\u7535\u5f71\u7684\u7f51\u7ad9\u7684\u652f\u6301\u5417\uff1f<\/h3>\n\n\n\n<p>\u4f5c\u4e3a\u653f\u7b56\uff08\u4ee5\u53ca\u5408\u6cd5\u6027\uff09\uff0cyoutube-dl\u4e0d\u5305\u62ec\u5bf9\u4e13\u95e8\u4fb5\u72af\u7248\u6743\u7684\u670d\u52a1\u7684\u652f\u6301\u3002\u6839\u636e\u7ecf\u9a8c\uff0c\u5982\u679c\u60a8\u65e0\u6cd5\u8f7b\u677e\u627e\u5230\u8be5\u670d\u52a1\u663e\u7136\u5141\u8bb8\u5206\u53d1\u7684\u89c6\u9891\uff08\u5373\u7531\u521b\u4f5c\u8005\u3001\u521b\u4f5c\u8005\u7684\u5206\u9500\u5546\u4e0a\u4f20\u6216\u6839\u636e\u514d\u8d39\u8bb8\u53ef\u8bc1\u53d1\u5e03\u7684\u89c6\u9891\uff09\uff0c\u8be5\u670d\u52a1\u53ef\u80fd\u4e0d\u9002\u5408\u5305\u542b\u5728youtube-dl\u3002<\/p>\n\n\n\n<p>\u5173\u4e8e\u8be5\u670d\u52a1\u7684\u6ce8\u91ca\uff0c\u5373\u4ed6\u4eec\u4e0d\u6258\u7ba1\u4fb5\u6743\u5185\u5bb9\uff0c\u800c\u53ea\u662f\u94fe\u63a5\u5230\u90a3\u4e9b\u6258\u7ba1\u4fb5\u6743\u5185\u5bb9\u7684\u4eba\uff0c\u8fd9\u8bc1\u660e\u8be5\u670d\u52a1\u4e0d\u5e94\u5305\u542b\u5728youtube-dl\u4e2d\u3002\u5f53\u670d\u52a1\u7684\u6574\u4e2a\u9996\u9875\u90fd\u88c5\u6ee1\u4e86\u4ed6\u4eec\u4e0d\u5141\u8bb8\u5206\u53d1\u7684\u89c6\u9891\u65f6\uff0c\u4efb\u4f55DMCA\u6ce8\u91ca\u4e5f\u662f\u5982\u6b64\u3002\u5982\u679c\u670d\u52a1\u672a\u7ecf\u6388\u6743\u5b8c\u6574\u663e\u793a\u53d7\u7248\u6743\u4fdd\u62a4\u7684\u89c6\u9891\uff0c\u5219\u201c\u5408\u7406\u4f7f\u7528\u201d\u6ce8\u91ca\u540c\u6837\u4e0d\u4ee4\u4eba\u4fe1\u670d\u3002<\/p>\n\n\n\n<p>\u4e0d\u8fc7\uff0c\u5bf9<strong>\u786e\u5b9e<\/strong>\u8d2d\u4e70\u5176\u5185\u5bb9\u5206\u53d1\u6743\u7684\u670d\u52a1\u7684\u652f\u6301\u8bf7\u6c42\u662f\u5b8c\u5168\u53ef\u4ee5\u7684\u3002\u5982\u6709\u7591\u95ee\uff0c\u60a8\u53ef\u4ee5\u7b80\u5355\u5730\u5305\u542b\u4e00\u4e2a\u63d0\u53ca\u5408\u6cd5\u8d2d\u4e70\u5185\u5bb9\u7684\u6765\u6e90\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-can-i-speed-up-work-on-my-issue\"><\/a>\u6211\u600e\u6837\u624d\u80fd\u52a0\u5feb\u89e3\u51b3\u6211\u95ee\u9898\u7684\u5de5\u4f5c\uff1f<\/h3>\n\n\n\n<p>\uff08\u4e5f\u79f0\u4e3a\uff1a\u5e2e\u52a9\uff0c\u6211\u7684\u91cd\u8981\u95ee\u9898\u6ca1\u6709\u89e3\u51b3\uff01\uff09youtube-dl\u6838\u5fc3\u5f00\u53d1\u4eba\u5458\u56e2\u961f\u89c4\u6a21\u76f8\u5f53\u5c0f\u3002\u867d\u7136\u6211\u4eec\u5c3d\u6700\u5927\u52aa\u529b\u89e3\u51b3\u5c3d\u53ef\u80fd\u591a\u7684\u95ee\u9898\uff0c\u4f46\u6709\u65f6\u8fd9\u53ef\u80fd\u9700\u8981\u76f8\u5f53\u957f\u7684\u65f6\u95f4\u3002\u4e3a\u4e86\u52a0\u5feb\u60a8\u7684\u95ee\u9898\uff0c\u60a8\u53ef\u4ee5\u505a\u5230\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u8bf7<a href=\"https:\/\/yt-dl.org\/bugs\">\u5728\u6211\u4eec\u7684\u95ee\u9898\u8ddf\u8e2a\u5668\u4e0a<\/a>\u62a5\u544a\u95ee\u9898\u3002\u8fd9\u4f7f\u6211\u4eec\u80fd\u591f\u534f\u8c03\u7528\u6237\u548c\u5f00\u53d1\u4eba\u5458\u7684\u6240\u6709\u52aa\u529b\uff0c\u5e76\u4f5c\u4e3a\u4e00\u4e2a\u7edf\u4e00\u70b9\u3002\u4e0d\u5e78\u7684\u662f\uff0cyoutube-dl\u9879\u76ee\u5df2\u7ecf\u53d8\u5f97\u592a\u5927\u4e86\uff0c\u65e0\u6cd5\u4f7f\u7528\u4e2a\u4eba\u7535\u5b50\u90ae\u4ef6\u4f5c\u4e3a\u6709\u6548\u7684\u6c9f\u901a\u6e20\u9053\u3002<\/p>\n\n\n\n<p>\u8bf7\u9605\u8bfb\u4e0b\u9762\u7684<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#bugs\">\u9519\u8bef\u62a5\u544a\u8bf4\u660e<\/a>\u3002\u8bb8\u591a\u9519\u8bef\u7f3a\u4e4f\u6240\u6709\u5fc5\u8981\u7684\u4fe1\u606f\u3002\u5982\u679c\u53ef\u4ee5\uff0c\u8bf7\u4e3ayoutube-dl\u5f00\u53d1\u4eba\u5458\u63d0\u4f9b\u4ee3\u7406\u3001VPN\u6216shell\u8bbf\u95ee\u3002\u5982\u679c\u53ef\u4ee5\uff0c\u8bf7\u5728\u591a\u4e2a\u56fd\u5bb6\u6216\u5730\u533a\u7684\u591a\u53f0\u7535\u8111\u4e0a\u6d4b\u8bd5\u95ee\u9898\uff0c\u4ee5\u6392\u9664\u672c\u5730\u5ba1\u67e5\u6216\u914d\u7f6e\u9519\u8bef\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u6ca1\u6709\u4eba\u6709\u5174\u8da3\u89e3\u51b3\u60a8\u7684\u95ee\u9898\uff0c\u6b22\u8fce\u60a8\u81ea\u884c\u5904\u7406\u5e76\u63d0\u4ea4\u62c9\u53d6\u8bf7\u6c42\uff08\u6216\u5f3a\u8feb\/\u652f\u4ed8\u5176\u4ed6\u4eba\u8fd9\u6837\u505a\uff09\u3002<\/p>\n\n\n\n<p>\u8bf7\u968f\u65f6\u901a\u8fc7\u5199\u4e00\u7bc7\u5c0f\u8bc4\u8bba\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff08\u201c\u95ee\u9898\u4ecd\u7136\u5b58\u5728\u4e8eyoutube-dl\u7248\u672c\u4e2d&#8230;&#8230;\u6765\u81ea\u6cd5\u56fd\uff0c\u4f46\u6765\u81ea\u6bd4\u5229\u65f6\uff09\uff0c\u4f46\u8bf7\u6bcf\u6708\u4e0d\u8d85\u8fc7\u4e00\u6b21\u3002\u8bf7\u4e0d\u8981\u5c06\u60a8\u7684\u95ee\u9898\u58f0\u660e\u4e3a<code>important<\/code>\u6216<code>urgent<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#how-can-i-detect-whether-a-given-url-is-supported-by-youtube-dl\"><\/a>\u5982\u4f55\u68c0\u6d4byoutube-dl\u662f\u5426\u652f\u6301\u7ed9\u5b9a\u7684URL\uff1f<\/h3>\n\n\n\n<p>\u9996\u5148\uff0c\u8bf7\u67e5\u770b<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/docs\/supportedsites.md\">\u53d7\u652f\u6301\u7f51\u7ad9\u7684\u5217\u8868<\/a>\u3002\u8bf7\u6ce8\u610f\uff0c\u7f51\u7ad9\u6709\u65f6\u4f1a\u66f4\u6539\u5176URL\u65b9\u6848\uff08\u4f8b\u5982\uff0c\u4ece<a href=\"https:\/\/example.com\/video\/1234567\">https:\/\/example.com\/video\/1234567<\/a>\u5230<a href=\"https:\/\/example.com\/v\/1234567\">https:\/\/example.com\/v\/1234567<\/a>\uff09\uff0cyoutube-dl\u62a5\u544a\u8be5\u5217\u8868\u4e2d\u670d\u52a1\u7684URL\u4e0d\u53d7\u652f\u6301\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ea\u9700\u62a5\u544a\u4e00\u4e2a\u9519\u8bef\u3002<\/p>\n\n\n\n<p>\u65e0\u6cd5\u68c0\u6d4b\u5230\u662f\u5426\u652f\u6301URL\u3002\u8fd9\u662f\u56e0\u4e3ayoutube-dl\u5305\u542b\u4e00\u4e2a\u5339\u914d<strong>\u6240\u6709<\/strong>URL\u7684\u901a\u7528\u63d0\u53d6\u5668\u3002\u60a8\u53ef\u80fd\u4f1a\u8bd5\u56fe\u7981\u7528\u3001\u6392\u9664\u6216\u5220\u9664\u901a\u7528\u63d0\u53d6\u5668\uff0c\u4f46\u901a\u7528\u63d0\u53d6\u5668\u4e0d\u4ec5\u5141\u8bb8\u7528\u6237\u4ece\u8bb8\u591a\u4ece\u5176\u4ed6\u670d\u52a1\u5d4c\u5165\u89c6\u9891\u7684\u7f51\u7ad9\u4e0a\u63d0\u53d6\u89c6\u9891\uff0c\u8fd8\u53ef\u7528\u4e8e\u4ece\u5176\u81ea\u5df1\u6258\u7ba1\u7684\u670d\u52a1\u4e2d\u63d0\u53d6\u89c6\u9891\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u65e2\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u7981\u7528\u3001\u6392\u9664\u6216\u5220\u9664\u901a\u7528\u63d0\u53d6\u5668\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u4e86\u89e3\u662f\u5426\u652f\u6301\u7ed9\u5b9a\u7684URL\uff0c\u53ea\u9700\u4f7f\u7528\u5b83\u8c03\u7528youtube-dl\u5373\u53ef\u3002\u5982\u679c\u60a8\u6ca1\u6709\u6536\u5230\u4efb\u4f55\u89c6\u9891\uff0cURL\u53ef\u80fd\u4e0d\u5f15\u7528\u89c6\u9891\u6216\u4e0d\u53d7\u652f\u6301\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u8f93\u51fa\uff08\u5982\u679c\u60a8\u5728\u63a7\u5236\u53f0\u4e0a\u8fd0\u884cyoutube-dl\uff09\u6216\u4ecePython\u7a0b\u5e8f\u8fd0\u884c\u65f6\u6355\u83b7<code>UnsupportedError<\/code>\u5f02\u5e38\u6765\u627e\u51fa\u54ea\u4e2a\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#why-do-i-need-to-go-through-that-much-red-tape-when-filing-bugs\"><\/a>\u4e3a\u4ec0\u4e48\u6211\u5728\u63d0\u4ea4\u9519\u8bef\u65f6\u9700\u8981\u7ecf\u5386\u8fd9\u4e48\u591a\u7e41\u6587\u7f1b\u8282\uff1f<\/h1>\n\n\n\n<p>\u5728\u6211\u4eec\u6709\u95ee\u9898\u6a21\u677f\u4e4b\u524d\uff0c\u5c3d\u7ba1\u6211\u4eec\u63d0\u4f9b\u4e86\u5e7f\u6cdb\u7684<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#bugs\">\u9519\u8bef\u62a5\u544a\u8bf4\u660e<\/a>\uff0c\u4f46\u6211\u4eec\u6536\u5230\u7684\u5927\u7ea680%\u7684\u95ee\u9898\u62a5\u544a\u6beb\u65e0\u7528\u5904\uff0c\u4f8b\u5982\uff0c\u7531\u4e8e\u4eba\u4eec\u4f7f\u7528\u4e86\u6570\u767e\u4e2a\u65e7\u7248\u672c\u7684\u53e4\u4ee3\u7248\u672c\uff0c\u56e0\u4e3a\u7b80\u5355\u7684\u8bed\u6cd5\u9519\u8bef\uff08\u4e0d\u662f\u5728youtube-dl\u4e2d\uff0c\u800c\u662f\u4e00\u822c\u7684shell\u4f7f\u7528\uff09\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u95ee\u9898\u4ee5\u524d\u5df2\u7ecf\u591a\u6b21\u62a5\u544a\u8fc7\uff0c\u56e0\u4e3a\u4eba\u4eec\u5b9e\u9645\u4e0a\u6ca1\u6709\u9605\u8bfb\u9519\u8bef\u6d88\u606f\uff0c\u5373\u4f7f\u4e0a\u9762\u5199\u7740\u201c\u8bf7\u5b89\u88c5ffmpeg\u201d\uff0c\u56e0\u4e3a\u4eba\u4eec\u6ca1\u6709\u63d0\u5230\u4ed6\u4eec\u8bd5\u56fe\u4e0b\u8f7d\u7684URL\u548c\u8bb8\u591a\u66f4\u7b80\u5355\u3001\u5bb9\u6613\u907f\u514d\u7684\u95ee\u9898\uff0c\u5176\u4e2d\u8bb8\u591a\u95ee\u9898\u4e0eyoutube-dl\u5b8c\u5168\u65e0\u5173\u3002<\/p>\n\n\n\n<p>youtube-dl\u662f\u4e00\u4e2a\u7531\u592a\u5c11\u7684\u5fd7\u613f\u8005\u7ec4\u6210\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u6240\u4ee5\u6211\u4eec\u5b81\u613f\u82b1\u65f6\u95f4\u4fee\u590d\u9519\u8bef\uff0c\u5728\u90a3\u91cc\u6211\u4eec\u786e\u5b9a\u8fd9\u4e9b\u7b80\u5355\u7684\u95ee\u9898\u90fd\u4e0d\u9002\u7528\uff0c\u5e76\u4e14\u6211\u4eec\u53ef\u4ee5\u6709\u4fe1\u5fc3\u5728\u4e0d\u53cd\u590d\u8be2\u95ee\u8bb0\u8005\u7684\u60c5\u51b5\u4e0b\u91cd\u73b0\u95ee\u9898\u3002\u56e0\u6b64\uff0c<code>youtube-dl -v YOUR_URL_HERE<\/code>\u7684\u8f93\u51fa\u5b9e\u9645\u4e0a\u662f\u63d0\u4ea4\u95ee\u9898\u6240\u9700\u7684\u5168\u90e8\u3002\u95ee\u9898\u6a21\u677f\u8fd8\u6307\u5bfc\u60a8\u5b8c\u6210\u4e00\u4e9b\u53ef\u4ee5\u5b8c\u6210\u7684\u57fa\u672c\u6b65\u9aa4\uff0c\u4f8b\u5982\u68c0\u67e5\u60a8\u7684youtube-dl\u7248\u672c\u662f\u5426\u662f\u6700\u65b0\u7684\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#developer-instructions\"><\/a>\u5f00\u53d1\u4eba\u5458\u8bf4\u660e<\/h1>\n\n\n\n<p>\u5927\u591a\u6570\u7528\u6237\u4e0d\u9700\u8981\u6784\u5efayoutube-dl\uff0c\u53ef\u4ee5<a href=\"https:\/\/ytdl-org.github.io\/youtube-dl\/download.html\">\u4e0b\u8f7d\u6784\u5efa\u7248\u672c<\/a>\u6216\u4ece\u5176\u53d1\u884c\u7248\u4e2d\u83b7\u53d6\u5b83\u4eec\u3002<\/p>\n\n\n\n<p>\u8981\u4f5c\u4e3a\u5f00\u53d1\u4eba\u5458\u8fd0\u884cyoutube-dl\uff0c\u60a8\u4e5f\u4e0d\u9700\u8981\u6784\u5efa\u4efb\u4f55\u4e1c\u897f\u3002\u53ea\u9700\u6267\u884c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python -m youtube_dl\n<\/pre>\n\n\n\n<p>\u8981\u8fd0\u884c\u6d4b\u8bd5\uff0c\u53ea\u9700\u8c03\u7528\u60a8\u6700\u559c\u6b22\u7684\u6d4b\u8bd5\u8fd0\u884c\u5668\uff0c\u6216\u76f4\u63a5\u6267\u884c\u6d4b\u8bd5\u6587\u4ef6\uff1b\u4ee5\u4e0b\u4efb\u4f55\u5de5\u4f5c\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python -m unittest discover\npython test\/test_download.py\nnosetests\n<\/pre>\n\n\n\n<p>\u6709\u5173\u5982\u4f55\u8fd0\u884c\u63d0\u53d6\u5668\u7279\u5b9a\u6d4b\u8bd5\u7528\u4f8b\uff0c\u8bf7\u53c2\u9605<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#adding-support-for-a-new-site\">\u65b0\u63d0\u53d6\u5668\u6559\u7a0b<\/a>\u7684\u7b2c6\u9879\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u81ea\u5df1\u521b\u5efayoutube-dl\u7684\u6784\u5efa\uff0c\u60a8\u9700\u8981<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Python<\/li><li>\u5236\u4f5c\uff08\u4ec5\u652f\u6301GNU\u5236\u4f5c\uff09<\/li><li>\u6f58\u591a\u514b<\/li><li>\u538b\u7f29\u5305<\/li><li>\u9f3b\u5b54\u6d4b\u8bd5<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#adding-support-for-a-new-site\"><\/a>\u6dfb\u52a0\u5bf9\u65b0\u7f51\u7ad9\u7684\u652f\u6301<\/h3>\n\n\n\n<p>\u5982\u679c\u60a8\u60f3\u6dfb\u52a0\u5bf9\u65b0\u7f51\u7ad9\u7684\u652f\u6301\uff0c\u9996\u5148<strong>\u8bf7\u786e\u4fdd<\/strong>\u672c\u7f51\u7ad9<strong>\u4e0d\u4e13\u95e8\u7528\u4e8e<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free\">\u7248\u6743\u4fb5\u6743<\/a><\/strong>\u3002youtube-dl<strong>\u4e0d\u652f\u6301<\/strong>\u6b64\u7c7b\u7f51\u7ad9\uff0c\u56e0\u6b64\u6dfb\u52a0\u652f\u6301\u5b83\u4eec\u7684\u62c9\u53d6\u8bf7\u6c42<strong>\u5c06\u88ab\u62d2\u7edd<\/strong>\u3002<\/p>\n\n\n\n<p>\u5728\u60a8\u786e\u4fdd\u672c\u7f51\u7ad9\u5408\u6cd5\u5206\u53d1\u5176\u5185\u5bb9\u540e\uff0c\u60a8\u53ef\u4ee5\u9075\u5faa\u6b64\u5feb\u901f\u5217\u8868\uff08\u5047\u8bbe\u60a8\u7684\u670d\u52a1\u79f0\u4e3a<code>yourextractor<\/code>\uff09\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/fork\">\u53c9\u6b64\u5b58\u50a8\u5e93<\/a><\/li><li>\u67e5\u770b\u6e90\u4ee3\u7801\uff1a<code> git clone git@github.com:YOUR_GITHUB_USERNAME\/youtube-dl.git<\/code><\/li><li>\u542f\u52a8\u4e00\u4e2a\u65b0\u7684git\u5206\u652f<code> cd youtube-dl git checkout -b yourextractor<\/code><\/li><li>\u4ece\u8fd9\u4e2a\u7b80\u5355\u7684\u6a21\u677f\u5f00\u59cb\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u5230<code>youtube_dl\/extractor\/yourextractor.py<\/code>\uff1a# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class YourExtractorIE(InfoExtractor): _VALID_URL = r&#8217;https?:\/\/(?:www\\.)?yourextractor\\.com\/watch\/(?P&lt;id&gt;[0-9]+)&#8217; _TEST = { &#8216;url&#8217;: &#8216;https:\/\/yourextractor.com\/watch\/42&#8217;, &#8216;md5&#8217;: &#8216;TODO: md5 sum of the first 10241 bytes of the video file (use &#8211;test)&#8217;, &#8216;info_dict&#8217;: { &#8216;id&#8217;: &#8217;42&#8217;, &#8216;ext&#8217;: &#8216;mp4&#8217;, &#8216;title&#8217;: &#8216;Video title goes here&#8217;, &#8216;thumbnail&#8217;: r&#8217;re:^https?:\/\/.*\\.jpg$&#8217;, # TODO more properties, either as: # * A value # * MD5 checksum; start the string with md5: # * A regular expression; start the string with re: # * Any Python type (for example int or float) } } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) # TODO more code goes here, for example &#8230; title = self._html_search_regex(r'&lt;h1&gt;(.+?)&lt;\/h1&gt;&#8217;, webpage, &#8216;title&#8217;) return { &#8216;id&#8217;: video_id, &#8216;title&#8217;: title, &#8216;description&#8217;: self._og_search_description(webpage), &#8216;uploader&#8217;: self._search_regex(r'&lt;div[^&gt;]+id=&#8221;uploader&#8221;[^&gt;]*&gt;([^&lt;]+)&lt;&#8216;, webpage, &#8216;uploader&#8217;, fatal=False), # TODO more properties (see youtube_dl\/extractor\/common.py) }<\/li><li>\u5728<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/youtube_dl\/extractor\/extractors.py\"><code>youtube_dl\/extractor\/extractors.py<\/code><\/a>\u4e2d\u6dfb\u52a0\u5bfc\u5165\u3002<\/li><li>\u8fd0\u884c<code>python test\/test_download.py TestDownload.test_YourExtractor<\/code>\u3002\u8fd9\u4e00\u5f00\u59cb<em>\u5e94\u8be5\u4f1a\u5931\u8d25<\/em>\uff0c\u4f46\u4f60\u53ef\u4ee5\u4e0d\u65ad\u91cd\u65b0\u8fd0\u884c\u5b83\uff0c\u76f4\u5230\u5b8c\u6210\u3002\u5982\u679c\u60a8\u51b3\u5b9a\u6dfb\u52a0\u591a\u4e2a\u6d4b\u8bd5\uff08\u5b9e\u9645\u4e0a\u662f\u6d4b\u8bd5\u7528\u4f8b\uff09\uff0c\u8bf7\u5c06<code>_TEST<\/code>\u91cd\u547d\u540d\u4e3a<code>_TESTS<\/code>\uff0c\u5e76\u5c06\u5176\u5236\u4f5c\u6210\u8bcd\u5178\u5217\u8868\u3002\u7136\u540e\uff0c\u8fd9\u4e9b\u6d4b\u8bd5\u5c06\u547d\u540d\u4e3a<code>TestDownload.test_YourExtractor<\/code>\u3001<code>TestDownload.test_YourExtractor_1<\/code>\u3001<code>TestDownload.test_YourExtractor_2<\/code>\u7b49\u3002\u7b14\u8bb0\uff1a<ul><li>\u6d4b\u8bd5\u540d\u79f0\u4f7f\u7528\u63d0\u53d6\u5668\u7c7b\u540d<strong>\uff0c\u800c\u65e0\u9700\u8ddf\u8e2a<code>IE<\/code><\/strong><\/li><li>tests with&nbsp;<code>only_matching<\/code>&nbsp;key in test&#8217;s dict are not counted.<\/li><\/ul><\/li><li>\u67e5\u770b<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/youtube_dl\/extractor\/common.py\"><code>youtube_dl\/extractor\/common.py<\/code><\/a>\uff0c\u4e86\u89e3\u53ef\u80fd\u7684\u8f85\u52a9\u65b9\u6cd5\uff0c\u5e76<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/7f41a598b3fba1bcab2817de64a08941200aa3c8\/youtube_dl\/extractor\/common.py#L94-L303\">\u8be6\u7ec6\u8bf4\u660e\u60a8\u7684\u63d0\u53d6\u5668\u5e94\u8be5\u548c\u53ef\u80fd\u8fd4\u56de\u4ec0\u4e48<\/a>\u3002\u6dfb\u52a0\u4efb\u610f\u6570\u91cf\u7684\u6d4b\u8bd5\u548c\u4ee3\u7801\u3002<\/li><li>\u786e\u4fdd\u60a8\u7684\u4ee3\u7801\u9075\u5faa<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#youtube-dl-coding-conventions\">youtube-dl\u7f16\u7801\u7ea6\u5b9a<\/a>\uff0c\u5e76\u4f7f\u7528<a href=\"https:\/\/flake8.pycqa.org\/en\/latest\/index.html#quickstart\">flake8<\/a>\u68c0\u67e5\u4ee3\u7801\uff1a<code> $ flake8 youtube_dl\/extractor\/yourextractor.py<\/code><\/li><li>\u786e\u4fdd\u60a8\u7684\u4ee3\u7801\u5728youtube-dl\u58f0\u79f0\u652f\u6301\u7684\u6240\u6709<a href=\"https:\/\/www.python.org\/\">Python<\/a>\u7248\u672c\u4e0b\u5de5\u4f5c\uff0c\u53732.6\u30012.7\u548c3.2+\u3002<\/li><li>\u6d4b\u8bd5\u901a\u8fc7\u540e\uff0c<a href=\"https:\/\/git-scm.com\/docs\/git-add\">\u6dfb\u52a0<\/a>\u65b0\u6587\u4ef6\u5e76<a href=\"https:\/\/git-scm.com\/docs\/git-commit\">\u63d0\u4ea4<\/a>\u5b83\u4eec\u5e76<a href=\"https:\/\/git-scm.com\/docs\/git-push\">\u63a8\u9001<\/a>\u7ed3\u679c\uff0c\u5982\u4e0b\u6240\u793a\uff1a<code>$ git add youtube_dl\/extractor\/extractors.py $ git add youtube_dl\/extractor\/yourextractor.py $ git commit -m '[yourextractor] Add new extractor' $ git push origin yourextractor<\/code><\/li><li>\u6700\u540e\uff0c<a href=\"https:\/\/help.github.com\/articles\/creating-a-pull-request\">\u521b\u5efa\u4e00\u4e2a\u62c9\u53d6\u8bf7\u6c42<\/a>\u3002\u7136\u540e\uff0c\u6211\u4eec\u5c06\u5bf9\u5176\u8fdb\u884c\u5ba1\u6838\u5e76\u5408\u5e76\u3002<\/li><\/ol>\n\n\n\n<p>\u65e0\u8bba\u5982\u4f55\uff0c\u975e\u5e38\u611f\u8c22\u60a8\u7684\u8d21\u732e\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#youtube-dl-coding-conventions\"><\/a>youtube-dl\u7f16\u7801\u7ea6\u5b9a<\/h2>\n\n\n\n<p>\u672c\u8282\u4ecb\u7ecd\u4e86\u7f16\u5199\u60ef\u7528\u3001\u5065\u58ee\u548c\u9762\u5411\u672a\u6765\u7684\u63d0\u53d6\u5668\u4ee3\u7801\u7684\u6307\u5357\u3002<\/p>\n\n\n\n<p>\u63d0\u53d6\u5668\u672c\u8d28\u4e0a\u975e\u5e38\u8106\u5f31\uff0c\u56e0\u4e3a\u5b83\u4eec\u4f9d\u8d56\u4e8e\u7b2c\u4e09\u65b9\u5a92\u4f53\u4e3b\u673a\u63d0\u4f9b\u7684\u6e90\u6570\u636e\u7684\u5e03\u5c40\uff0c\u5e76\u4e14\u8fd9\u79cd\u5e03\u5c40\u5f80\u5f80\u4f1a\u53d1\u751f\u53d8\u5316\u3002\u4f5c\u4e3a\u63d0\u53d6\u5668\u5b9e\u73b0\u8005\uff0c\u60a8\u7684\u4efb\u52a1\u4e0d\u4ec5\u662f\u7f16\u5199\u53ef\u4ee5\u6b63\u786e\u63d0\u53d6\u5a92\u4f53\u94fe\u63a5\u548c\u5143\u6570\u636e\u7684\u4ee3\u7801\uff0c\u800c\u4e14\u8981\u5c3d\u91cf\u51cf\u5c11\u5bf9\u6e90\u5e03\u5c40\u7684\u4f9d\u8d56\uff0c\u751a\u81f3\u4f7f\u4ee3\u7801\u9884\u89c1\u672a\u6765\u7684\u6f5c\u5728\u66f4\u6539\uff0c\u5e76\u4e3a\u6b64\u505a\u597d\u51c6\u5907\u3002\u8fd9\u5f88\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u5c06\u5141\u8bb8\u63d0\u53d6\u5668\u4e0d\u4f1a\u4e2d\u65ad\u5c0f\u7684\u5e03\u5c40\u66f4\u6539\uff0c\u4ece\u800c\u4fdd\u6301\u65e7\u7684youtube-dl\u7248\u672c\u6b63\u5e38\u5de5\u4f5c\u3002\u5c3d\u7ba1\u901a\u8fc7\u53d1\u5c04\u5e26\u6709\u4fee\u590d\u7a0b\u5e8f\u7684\u65b0\u7248\u672c\u7684youtube-dl\u5f88\u5bb9\u6613\u89e3\u51b3\u8fd9\u4e2a\u7834\u635f\u95ee\u9898\uff0c\u4f46\u6240\u6709\u4ee5\u524d\u7684\u7248\u672c\u90fd\u5728\u6240\u6709\u5b58\u50a8\u5e93\u548c\u53d1\u884c\u7248\u7684\u8f6f\u4ef6\u5305\u4e2d\u90fd\u574f\u4e86\uff0c\u8fd9\u4e9b\u8f6f\u4ef6\u5305\u53ef\u80fd\u65e0\u6cd5\u53ca\u65f6\u5730\u4ece\u6211\u4eec\u8fd9\u91cc\u83b7\u53d6\u66f4\u65b0\u3002\u4e0d\u7528\u8bf4\uff0c\u4e00\u4e9b\u975e\u6eda\u52a8\u53d1\u884c\u7248\u53ef\u80fd\u6c38\u8fdc\u4e0d\u4f1a\u6536\u5230\u66f4\u65b0\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#mandatory-and-optional-metafields\"><\/a>\u5f3a\u5236\u6027\u548c\u53ef\u9009\u7684\u5143\u5b57\u6bb5<\/h3>\n\n\n\n<p>\u4e3a\u4e86\u4f7f\u63d0\u53d6\u5de5\u4f5c\uff0cyoutube-dl\u4f9d\u8d56\u4e8e\u63d0\u53d6\u5668\u63d0\u53d6\u7684\u5143\u6570\u636e\uff0c\u5e76\u63d0\u4f9b\u901a\u8fc7<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/7f41a598b3fba1bcab2817de64a08941200aa3c8\/youtube_dl\/extractor\/common.py#L94-L303\">\u4fe1\u606f\u8bcd\u5178<\/a>\u6216\u7b80\u5355<em>\u4fe1\u606f\u6307\u4ee4<\/em>\u8868\u8fbe\u7684youtube-dl\u3002\u53ea\u6709<em>\u4fe1\u606f\u6307\u4ee4<\/em>\u4e2d\u7684\u4ee5\u4e0b\u5143\u5b57\u6bb5\u88ab\u8ba4\u4e3a\u662fyoutube-dl\u6210\u529f\u63d0\u53d6\u8fc7\u7a0b\u7684\u5fc5\u586b\u9879\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>id<\/code>\uff08\u5a92\u4f53\u6807\u8bc6\u7b26\uff09<\/li><li><code>title<\/code>\uff08\u5a92\u4f53\u6807\u9898\uff09<\/li><li><code>url<\/code>\uff08\u5a92\u4f53\u4e0b\u8f7d URL\uff09\u6216<code>formats<\/code><\/li><\/ul>\n\n\n\n<p>\u4e8b\u5b9e\u4e0a\uff0c\u53ea\u6709\u6700\u540e\u4e00\u4e2a\u9009\u9879\u5728\u6280\u672f\u4e0a\u662f\u5f3a\u5236\u6027\u7684\uff08\u5373\uff0c\u5982\u679c\u60a8\u65e0\u6cd5\u786e\u5b9a\u5a92\u4f53\u7684\u4e0b\u8f7d\u4f4d\u7f6e\uff0c\u5219\u63d0\u53d6\u6ca1\u6709\u4efb\u4f55\u610f\u4e49\uff09\u3002\u4f46\u6839\u636e\u60ef\u4f8b\uff0cyoutube-dl\u4e5f\u5c06<code>id<\/code>\u548c<code>title<\/code>\u89c6\u4e3a\u5f3a\u5236\u6027\u7684\u3002\u56e0\u6b64\uff0c\u4e0a\u8ff0\u5143\u5b57\u6bb5\u662f\u6ca1\u6709\u63d0\u53d6\u5c31\u6ca1\u6709\u4efb\u4f55\u610f\u4e49\u7684\u5173\u952e\u6570\u636e\uff0c\u5982\u679c\u5176\u4e2d\u4efb\u4f55\u4e00\u4e2a\u65e0\u6cd5\u63d0\u53d6\uff0c\u5219\u63d0\u53d6\u5668\u5c06\u88ab\u89c6\u4e3a\u5b8c\u5168\u635f\u574f\u3002<\/p>\n\n\n\n<p>\u9664\u4e0a\u8ff0\u5b57\u6bb5\u5916\uff0c<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/7f41a598b3fba1bcab2817de64a08941200aa3c8\/youtube_dl\/extractor\/common.py#L188-L303\">\u4efb\u4f55\u5b57\u6bb5<\/a>\u90fd\u88ab\u89c6\u4e3a<strong>\u53ef\u9009\u5b57\u6bb5<\/strong>\u3002\u8fd9\u610f\u5473\u7740\u63d0\u53d6\u5e94\u8be5<strong>\u5bb9\u5fcd<\/strong>\u8fd9\u4e9b\u5b57\u6bb5\u7684\u6765\u6e90\u53ef\u80fd\u4e0d\u53ef\u7528\uff08\u5373\u4f7f\u5b83\u4eec\u76ee\u524d\u603b\u662f\u53ef\u7528\uff09\u548c<strong>\u9762\u5411\u672a\u6765\u7684<\/strong>\u60c5\u51b5\uff0c\u4ee5\u514d\u4e2d\u65ad\u901a\u7528\u5f3a\u5236\u5b57\u6bb5\u7684\u63d0\u53d6\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example\"><\/a>\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<p>\u5047\u8bbe\u60a8\u6709\u4e00\u4e9b\u6e90\u5b57\u5178<code>meta<\/code>\uff0c\u60a8\u901a\u8fc7HTTP\u8bf7\u6c42\u4f5c\u4e3aJSON\u83b7\u53d6\uff0c\u5b83\u6709\u4e00\u4e2a\u5173\u952e<code>summary<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">meta = self._download_json(url, video_id)<\/pre>\n\n\n\n<p>\u5047\u8bbe\u6b64\u65f6<code>meta<\/code>\u7684\u5e03\u5c40\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n    ...\n    \"summary\": \"some fancy summary text\",\n    ...\n}<\/pre>\n\n\n\n<p>\u5047\u8bbe\u60a8\u60f3\u63d0\u53d6<code>summary<\/code>\u5e76\u5c06\u5176\u4f5c\u4e3a<code>description<\/code>\u653e\u5165\u751f\u6210\u7684\u4fe1\u606f\u6307\u4ee4\u4e2d\u3002\u7531\u4e8e<code>description<\/code>\u662f\u4e00\u4e2a\u53ef\u9009\u7684\u5143\u5b57\u6bb5\uff0c\u60a8\u5e94\u8be5\u51c6\u5907\u597d<code>meta<\/code>\u547d\u4ee4\u4e2d\u53ef\u80fd\u7f3a\u5c11\u6b64\u5bc6\u94a5\uff0c\u56e0\u6b64\u60a8\u5e94\u8be5\u50cf\u4ee5\u4e0b\u4e00\u6837\u63d0\u53d6\u5b83\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">description = meta.get('summary')  # correct<\/pre>\n\n\n\n<p>\u4e0d\u559c\u6b22\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">description = meta['summary']  # incorrect<\/pre>\n\n\n\n<p>\u5982\u679c<code>summary<\/code>\u5728\u7a0d\u540e\u4ece<code>meta<\/code>\u4e2d\u6d88\u5931\uff0c\u540e\u8005\u5c06\u4e2d\u65ad<code>KeyError<\/code>\u7684\u63d0\u53d6\u8fc7\u7a0b\uff0c\u4f46\u4f7f\u7528\u524d\u4e00\u79cd\u65b9\u6cd5\uff0c\u63d0\u53d6\u5c06\u7ee7\u7eed\u5c06<code>description<\/code>\u8bbe\u7f6e\u4e3a<code>None<\/code>\uff0c\u8fd9\u5b8c\u5168\u6ca1\u95ee\u9898\uff08\u8bf7\u8bb0\u4f4f\uff0c<code>None<\/code>\u76f8\u5f53\u4e8e\u6ca1\u6709\u6570\u636e\uff09\u3002<\/p>\n\n\n\n<p>\u540c\u6837\uff0c\u5f53\u4f7f\u7528<code>_search_regex<\/code>\u3001<code>_html_search_regex<\/code>\u6216\u7c7b\u4f3c\u65b9\u6cd5\u4ece\u7f51\u9875\u4e2d\u63d0\u53d6\u53ef\u9009\u6570\u636e\u65f6\uff0c\u60a8\u5e94\u8be5\u4f20\u9012<code>fatal=False<\/code>\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">description = self._search_regex(\n    r'&lt;span[^&gt;]+id=\"title\"[^&gt;]*&gt;([^&lt;]+)&lt;',\n    webpage, 'description', fatal=False)<\/pre>\n\n\n\n<p>\u5982\u679c<code>_search_regex<\/code>\u65e0\u6cd5\u63d0\u53d6<code>description<\/code>\uff0c\u5219\u5c06<code>fatal<\/code>\u8bbe\u7f6e\u4e3a<code>False<\/code>\uff0c\u5b83\u5c06\u53d1\u51fa\u8b66\u544a\u5e76\u7ee7\u7eed\u63d0\u53d6\u3002<\/p>\n\n\n\n<p>\u60a8\u8fd8\u53ef\u4ee5\u4f20\u9012<code>default=&lt;some fallback value&gt;<\/code>\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">description = self._search_regex(\n    r'&lt;span[^&gt;]+id=\"title\"[^&gt;]*&gt;([^&lt;]+)&lt;',\n    webpage, 'description', default=None)<\/pre>\n\n\n\n<p>\u5931\u8d25\u65f6\uff0c\u6b64\u4ee3\u7801\u5c06\u9759\u9ed8\u5730\u7ee7\u7eed\u63d0\u53d6\uff0c\u5e76\u5c06<code>description<\/code>\u8bbe\u7f6e\u4e3a<code>None<\/code>\u3002\u8fd9\u5bf9\u4e8e\u53ef\u80fd\u5b58\u5728\u4e5f\u53ef\u80fd\u4e0d\u5b58\u5728\u7684\u5143\u5b57\u6bb5\u975e\u5e38\u6709\u7528\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#provide-fallbacks\"><\/a>\u63d0\u4f9b\u56de\u9000<\/h3>\n\n\n\n<p>\u5728\u63d0\u53d6\u5143\u6570\u636e\u65f6\uff0c\u8bf7\u5c1d\u8bd5\u4ece\u591a\u4e2a\u6765\u6e90\u63d0\u53d6\u5143\u6570\u636e\u3002\u4f8b\u5982\uff0c\u5982\u679c<code>title<\/code>\u5b58\u5728\u4e8e\u51e0\u4e2a\u5730\u65b9\uff0c\u8bf7\u5c1d\u8bd5\u81f3\u5c11\u4ece\u5176\u4e2d\u4e00\u4e9b\u5730\u65b9\u63d0\u53d6\u3002\u8fd9\u4f7f\u5b83\u66f4\u9002\u5408\u672a\u6765\uff0c\u4ee5\u9632\u4e00\u4e9b\u6765\u6e90\u4e0d\u53ef\u7528\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example-1\"><\/a>\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<p>\u5047\u8bbe\u4e0a\u4e00\u4e2a\u793a\u4f8b\u4e2d\u7684<code>meta<\/code>\u6709\u4e00\u4e2a<code>title<\/code>\uff0c\u4f60\u5373\u5c06\u63d0\u53d6\u5b83\u3002\u7531\u4e8e<code>title<\/code>\u662f\u4e00\u4e2a\u5f3a\u5236\u6027\u7684\u5143\u5b57\u6bb5\uff0c\u56e0\u6b64\u60a8\u5e94\u8be5\u6700\u7ec8\u83b7\u5f97\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">title = meta['title']<\/pre>\n\n\n\n<p>\u5982\u679c<code>title<\/code>\u5c06\u6765\u56e0\u4e3b\u673a\u65b9\u9762\u7684\u4e00\u4e9b\u66f4\u6539\u800c\u4ece<code>meta<\/code>\u4e2d\u5220\u9664\uff0c\u5219\u63d0\u53d6\u5c06\u5931\u8d25\uff0c\u56e0\u4e3a<code>title<\/code>\u662f\u5f3a\u5236\u6027\u7684\u3002\u8fd9\u662f\u610f\u6599\u4e4b\u4e2d\u7684\u3002<\/p>\n\n\n\n<p>Assume that you have some another source you can extract&nbsp;<code>title<\/code>&nbsp;from, for example&nbsp;<code>og:title<\/code>&nbsp;HTML meta of a&nbsp;<code>webpage<\/code>. In this case you can provide a fallback scenario:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">title = meta.get('title') or self._og_search_title(webpage)<\/pre>\n\n\n\n<p>\u6b64\u4ee3\u7801\u5c06\u5c1d\u8bd5\u9996\u5148\u4ece<code>meta<\/code>\u4e2d\u63d0\u53d6\uff0c\u5982\u679c\u5931\u8d25\uff0c\u5b83\u5c06\u5c1d\u8bd5\u4ece<code>webpage<\/code>\u4e2d\u63d0\u53d6<code>og:title<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#regular-expressions\"><\/a>\u6b63\u5219\u8868\u8fbe\u5f0f<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#dont-capture-groups-you-dont-use\"><\/a>\u4e0d\u8981\u6355\u83b7\u60a8\u4e0d\u4f7f\u7528\u7684\u7ec4<\/h4>\n\n\n\n<p>\u6355\u83b7\u7ec4\u5fc5\u987b\u8868\u660e\u5b83\u5728\u4ee3\u7801\u7684\u67d0\u4e2a\u5730\u65b9\u4f7f\u7528\u8fc7\u3002\u4efb\u4f55\u672a\u4f7f\u7528\u7684\u7ec4\u90fd\u5fc5\u987b\u662f\u975e\u6355\u83b7\u7684\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example-2\"><\/a>\u793a\u4f8b\uff1a<\/h5>\n\n\n\n<p>\u4e0d\u8981\u5728\u8fd9\u91cc\u6355\u83b7id\u5c5e\u6027\u540d\u79f0\uff0c\u56e0\u4e3a\u65e0\u8bba\u5982\u4f55\u60a8\u90fd\u65e0\u6cd5\u5c06\u5176\u7528\u4e8e\u4efb\u4f55\u7528\u9014\u3002<\/p>\n\n\n\n<p>\u6b63\u786e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">r'(?:id|ID)=(?P&lt;id&gt;\\d+)'<\/pre>\n\n\n\n<p>\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">r'(id|ID)=(?P&lt;id&gt;\\d+)'<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#make-regular-expressions-relaxed-and-flexible\"><\/a>\u4f7f\u6b63\u5219\u8868\u8fbe\u8f7b\u677e\u7075\u6d3b<\/h4>\n\n\n\n<p>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u65f6\uff0c\u8bf7\u5c1d\u8bd5\u5c06\u5176\u5199\u6210\u6a21\u7cca\u3001\u653e\u677e\u548c\u7075\u6d3b\uff0c\u8df3\u8fc7\u66f4\u6709\u53ef\u80fd\u66f4\u6539\u7684\u5fae\u4e0d\u8db3\u9053\u7684\u90e8\u5206\uff0c\u5141\u8bb8\u5f15\u7528\u503c\u7684\u5355\u5f15\u53f7\u548c\u53cc\u5f15\u53f7\u7b49\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example-3\"><\/a>\u793a\u4f8b\uff1a<\/h5>\n\n\n\n<p>\u5047\u8bbe\u60a8\u9700\u8981\u4ece\u4ee5\u4e0bHTML\u4ee3\u7801\u4e2d\u63d0\u53d6<code>title<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;span style=\"position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;\" class=\"title\"&gt;some fancy title&lt;\/span&gt;<\/pre>\n\n\n\n<p>\u8be5\u4efb\u52a1\u7684\u4ee3\u7801\u5e94\u8be5\u7c7b\u4f3c\u4e8e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">title = self._search_regex(\n    r'&lt;span[^&gt;]+class=\"title\"[^&gt;]*&gt;([^&lt;]+)', webpage, 'title')<\/pre>\n\n\n\n<p>\u6216\u8005\u66f4\u597d\u7684\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">title = self._search_regex(\n    r'&lt;span[^&gt;]+class=([\"\\'])title\\1[^&gt;]*&gt;(?P&lt;title&gt;[^&lt;]+)',\n    webpage, 'title', group='title')<\/pre>\n\n\n\n<p>\u6ce8\u610f\u5982\u4f55\u5bb9\u5fcd<code>style<\/code>\u5c5e\u6027\u503c\u7684\u6f5c\u5728\u53d8\u5316\uff0c\u6216\u4ece\u4f7f\u7528\u53cc\u5f15\u53f7\u5207\u6362\u5230\u5355<code>class<\/code>\u5c5e\u6027\uff1a<\/p>\n\n\n\n<p>\u4ee3\u7801\u7edd\u5bf9\u4e0d\u5e94\u8be5\u770b\u8d77\u6765\u50cf\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">title = self._search_regex(\n    r'&lt;span style=\"position: absolute; left: 910px; width: 90px; float: right; z-index: 9999;\" class=\"title\"&gt;(.*?)&lt;\/span&gt;',\n    webpage, 'title', group='title')<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#long-lines-policy\"><\/a>\u957f\u7ebf\u653f\u7b56<\/h3>\n\n\n\n<p>\u6709\u4e00\u4e2a\u8f6f\u9650\u5236\uff0c\u53ef\u4ee5\u5c06\u4ee3\u7801\u884c\u4fdd\u6301\u572880\u4e2a\u5b57\u7b26\u4ee5\u4e0b\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5982\u679c\u53ef\u80fd\u7684\u8bdd\uff0c\u5982\u679c\u5b83\u4e0d\u80fd\u4f7f\u53ef\u8bfb\u6027\u548c\u4ee3\u7801\u7ef4\u62a4\u6076\u5316\uff0c\u5219\u5e94\u8be5\u5c0a\u91cd\u5b83\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u60a8<strong>\u7edd\u4e0d<\/strong>\u5e94\u5c06URL\u7b49\u957f\u5b57\u7b26\u4e32\u6587\u5b57\u6216\u5176\u4ed6\u7ecf\u5e38\u590d\u5236\u7684\u5b9e\u4f53\u62c6\u5206\u4e3a\u591a\u884c\uff0c\u4ee5\u9002\u5e94\u6b64\u9650\u5236\uff1a<\/p>\n\n\n\n<p>\u6b63\u786e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'https:\/\/www.youtube.com\/watch?v=FqZTN594JQw&amp;list=PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4'<\/pre>\n\n\n\n<p>\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'https:\/\/www.youtube.com\/watch?v=FqZTN594JQw&amp;list='\n'PLMYEtVRpaqY00V9W81Cwmzp6N6vZqfUKD4'<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#inline-values\"><\/a>\u5185\u8054\u503c<\/h3>\n\n\n\n<p>\u63d0\u53d6\u53d8\u91cf\u5bf9\u4e8e\u51cf\u5c11\u4ee3\u7801\u91cd\u590d\u548c\u63d0\u9ad8\u590d\u6742\u8868\u8fbe\u5f0f\u7684\u53ef\u8bfb\u6027\u662f\u53ef\u4ee5\u63a5\u53d7\u7684\u3002\u4f46\u662f\uff0c\u60a8\u5e94\u8be5\u907f\u514d\u63d0\u53d6\u4ec5\u4f7f\u7528\u4e00\u6b21\u7684\u53d8\u91cf\uff0c\u5e76\u5c06\u5b83\u4eec\u79fb\u52a8\u5230\u63d0\u53d6\u5668\u6587\u4ef6\u7684\u76f8\u53cd\u90e8\u5206\uff0c\u8fd9\u4f7f\u5f97\u8bfb\u53d6\u7ebf\u6027\u6d41\u53d8\u5f97\u56f0\u96be\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example-4\"><\/a>\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<p>\u6b63\u786e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">title = self._html_search_regex(r'&lt;title&gt;([^&lt;]+)&lt;\/title&gt;', webpage, 'title')<\/pre>\n\n\n\n<p>\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">TITLE_RE = r'&lt;title&gt;([^&lt;]+)&lt;\/title&gt;'\n# ...some lines of code...\ntitle = self._html_search_regex(TITLE_RE, webpage, 'title')<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#collapse-fallbacks\"><\/a>\u5d29\u6e83\u540e\u5907<\/h3>\n\n\n\n<p>\u591a\u4e2a\u56de\u9000\u503c\u53ef\u80fd\u4f1a\u5f88\u5feb\u53d8\u5f97\u7b28\u62d9\u3002\u901a\u8fc7\u6a21\u5f0f\u5217\u8868\u5c06\u591a\u4e2a\u56de\u9000\u503c\u6298\u53e0\u5230\u5355\u4e2a\u8868\u8fbe\u5f0f\u4e2d\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example-5\"><\/a>\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<p>\u5f88\u597d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">description = self._html_search_meta(\n    ['og:description', 'description', 'twitter:description'],\n    webpage, 'description', default=None)<\/pre>\n\n\n\n<p>Unwieldy\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">description = (\n    self._og_search_description(webpage, default=None)\n    or self._html_search_meta('description', webpage, default=None)\n    or self._html_search_meta('twitter:description', webpage, default=None))<\/pre>\n\n\n\n<p>\u652f\u6301\u6a21\u5f0f\u5217\u8868\u7684\u65b9\u6cd5\u662f\uff1a<code>_search_regex<\/code>\u3001<code>_html_search_regex<\/code>\u3001<code>_og_search_property<\/code>\u3001<code>_html_search_meta<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#trailing-parentheses\"><\/a>\u5c3e\u968f\u62ec\u53f7<\/h3>\n\n\n\n<p>\u59cb\u7ec8\u5728\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u4e4b\u540e\u79fb\u52a8\u540e\u9762\u7684\u62ec\u53f7\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#example-6\"><\/a>\u793a\u4f8b\uff1a<\/h4>\n\n\n\n<p>\u6b63\u786e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'],\n    list)<\/pre>\n\n\n\n<p>\u9519\u8bef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    lambda x: x['ResultSet']['Result'][0]['VideoUrlSet']['VideoUrl'],\n    list,\n)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#use-convenience-conversion-and-parsing-functions\"><\/a>\u4f7f\u7528\u65b9\u4fbf\u7684\u8f6c\u6362\u548c\u89e3\u6790\u529f\u80fd<\/h3>\n\n\n\n<p>\u5c06\u6240\u6709\u63d0\u53d6\u7684\u6570\u5b57\u6570\u636e\u4ece<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/youtube_dl\/utils.py\"><code>youtube_dl\/utils.py<\/code><\/a>\uff1a<code>int_or_none<\/code>\uff0c<code>float_or_none<\/code>\u7684\u5b89\u5168\u51fd\u6570\u4e2d\u3002\u4e5f\u5c06\u5b83\u4eec\u7528\u4e8e\u5b57\u7b26\u4e32\u5230\u6570\u5b57\u8f6c\u6362\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528<code>url_or_none<\/code>\u8fdb\u884c\u5b89\u5168\u7684URL\u5904\u7406\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528<code>try_get<\/code>\u4ece\u89e3\u6790\u7684JSON\u4e2d\u5b89\u5168\u5730\u63d0\u53d6\u5143\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528<code>unified_strdate<\/code>\u8fdb\u884cuniform&nbsp;<code>upload_date<\/code>\u6216\u4efb\u4f55<code>YYYYMMDD<\/code>\u5143\u5b57\u6bb5\u63d0\u53d6\uff0c<code>unified_timestamp<\/code>\u7528\u4e8e\u7edf\u4e00<code>timestamp<\/code>\u63d0\u53d6\uff0c<code>parse_filesize<\/code>\u7528\u4e8e<code>filesize<\/code>\u63d0\u53d6\uff0c<code>parse_count<\/code>\u7528\u4e8e\u8ba1\u6570\u5143\u5b57\u6bb5\u63d0\u53d6\uff0c<code>parse_resolution<\/code>\uff0c<code>parse_duration<\/code>\u7528\u4e8e<code>duration<\/code>\u63d0\u53d6\uff0c<code>parse_age_limit<\/code>\u7528\u4e8e<code>age_limit<\/code>\u63d0\u53d6\u3002<\/p>\n\n\n\n<p>\u63a2\u7d22<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/youtube_dl\/utils.py\"><code>youtube_dl\/utils.py<\/code><\/a>\u4ee5\u83b7\u53d6\u66f4\u6709\u7528\u7684\u4fbf\u5229\u529f\u80fd\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#more-examples\"><\/a>\u66f4\u591a\u793a\u4f8b<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#safely-extract-optional-description-from-parsed-json\"><\/a>\u5b89\u5168\u4ece\u89e3\u6790\u7684JSON\u4e2d\u63d0\u53d6\u53ef\u9009\u63cf\u8ff0<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">description = try_get(response, lambda x: x['result']['video'][0]['summary'], compat_str)<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#safely-extract-more-optional-metadata\"><\/a>\u5b89\u5168\u63d0\u53d6\u66f4\u591a\u53ef\u9009\u5143\u6570\u636e<\/h5>\n\n\n\n<pre class=\"wp-block-preformatted\">video = try_get(response, lambda x: x['result']['video'][0], dict) or {}\ndescription = video.get('summary')\nduration = float_or_none(video.get('durationMs'), scale=1000)\nview_count = int_or_none(video.get('views'))<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#embedding-youtube-dl\"><\/a>\u5d4c\u5165YOUTUBE-DL<\/h1>\n\n\n\n<p>youtube-dl\u5c3d\u6700\u5927\u52aa\u529b\u6210\u4e3a\u4e00\u4e2a\u597d\u7684\u547d\u4ee4\u884c\u7a0b\u5e8f\uff0c\u56e0\u6b64\u5e94\u8be5\u53ef\u4ee5\u4ece\u4efb\u4f55\u7f16\u7a0b\u8bed\u8a00\u8c03\u7528\u3002\u5982\u679c\u60a8\u5728\u89e3\u6790\u5176\u8f93\u51fa\u65f6\u9047\u5230\u4efb\u4f55\u95ee\u9898\uff0c\u8bf7\u968f\u65f6<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/issues\/new\">\u521b\u5efa\u62a5\u544a<\/a>\u3002<\/p>\n\n\n\n<p>\u4ecePython\u7a0b\u5e8f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4ee5\u66f4\u5f3a\u5927\u7684\u65b9\u5f0f\u5d4c\u5165youtube-dl\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from __future__ import unicode_literals\nimport youtube_dl\n\nydl_opts = {}\nwith youtube_dl.YoutubeDL(ydl_opts) as ydl:\n    ydl.download(['https:\/\/www.youtube.com\/watch?v=BaW_jenozKc'])<\/pre>\n\n\n\n<p>\u6700\u6709\u53ef\u80fd\u7684\u662f\uff0c\u60a8\u4f1a\u60f3\u8981\u4f7f\u7528\u5404\u79cd\u9009\u9879\u3002\u6709\u5173\u53ef\u7528\u9009\u9879\u7684\u5217\u8868\uff0c\u8bf7\u67e5\u770b<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/3e4cedf9e8cd3157df2457df7274d0c842421945\/youtube_dl\/YoutubeDL.py#L137-L312\"><code>youtube_dl\/YoutubeDL.py<\/code><\/a>\u3002\u9996\u5148\uff0c\u5982\u679c\u60a8\u60f3\u62e6\u622ayoutube-dl\u7684\u8f93\u51fa\uff0c\u8bf7\u8bbe\u7f6e\u4e00\u4e2a<code>logger<\/code>\u5bf9\u8c61\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u66f4\u5b8c\u6574\u7684\u7a0b\u5e8f\u793a\u4f8b\uff0c\u8be5\u7a0b\u5e8f\u4ec5\u8f93\u51fa\u9519\u8bef\uff08\u4e0b\u8f7d\u5b8c\u6210\u540e\u663e\u793a\u4e00\u6761\u77ed\u4fe1\uff09\uff0c\u5e76\u5c06\u89c6\u9891\u4e0b\u8f7d\/\u8f6c\u6362\u4e3amp3\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from __future__ import unicode_literals\nimport youtube_dl\n\n\nclass MyLogger(object):\n    def debug(self, msg):\n        pass\n\n    def warning(self, msg):\n        pass\n\n    def error(self, msg):\n        print(msg)\n\n\ndef my_hook(d):\n    if d['status'] == 'finished':\n        print('Done downloading, now converting ...')\n\n\nydl_opts = {\n    'format': 'bestaudio\/best',\n    'postprocessors': [{\n        'key': 'FFmpegExtractAudio',\n        'preferredcodec': 'mp3',\n        'preferredquality': '192',\n    }],\n    'logger': MyLogger(),\n    'progress_hooks': [my_hook],\n}\nwith youtube_dl.YoutubeDL(ydl_opts) as ydl:\n    ydl.download(['https:\/\/www.youtube.com\/watch?v=BaW_jenozKc'])<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#bugs\"><\/a>\u6f0f\u6d1e<\/h1>\n\n\n\n<p>\u9519\u8bef\u548c\u5efa\u8bae\u5e94\u5728\u4ee5\u4e0b\u7f51\u5740\u62a5\u544a\uff1a<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/issues\">https:\/\/github.com\/ytdl-org\/youtube-dl\/issues<\/a>\u3002\u9664\u975e\u60a8\u88ab\u63d0\u793a\u6216\u6709\u5176\u4ed6\u76f8\u5173\u539f\u56e0\uff08\u4f8b\u5982GitHub\u672a\u80fd\u63a5\u53d7\u9519\u8bef\u62a5\u544a\uff09\uff0c\u8bf7\u4e0d\u8981\u901a\u8fc7\u7535\u5b50\u90ae\u4ef6\u53d1\u9001\u9519\u8bef\u62a5\u544a\u3002\u5982\u9700\u8ba8\u8bba\uff0c\u8bf7\u52a0\u5165\u6211\u4eecfreenode\uff08<a href=\"https:\/\/webchat.freenode.net\/?randomnick=1&amp;channels=youtube-dl\">\u7f51\u7edc\u804a\u5929<\/a>\uff09\u4e0a\u7684IRC\u9891\u9053#youtube-dl\u3002<\/p>\n\n\n\n<p><strong>\u4f7f\u7528<code>-v<\/code>\u8fd0\u884c\u65f6\uff0c\u8bf7\u5305\u542byoutube-dl\u7684\u5b8c\u6574\u8f93\u51fa<\/strong>\uff0c\u5373\u5728<strong>\u547d\u4ee4\u884c<\/strong><strong>\u4e2d\u6dfb\u52a0<\/strong><code>-v<\/code>\u6807\u5fd7\uff0c\u590d\u5236<strong>\u6574\u4e2a<\/strong>\u8f93\u51fa\u5e76\u5c06\u5176\u53d1\u5e03\u5728\u201c`\u201d\u5305\u88c5\u7684\u95ee\u9898\u6b63\u6587\u4e2d\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u683c\u5f0f\u5316\u3002\u5b83\u5e94\u8be5\u770b\u8d77\u6765\u4e0e\u6b64\u76f8\u4f3c\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ youtube-dl -v &lt;your command line>\n[debug] System config: []\n[debug] User config: []\n[debug] Command-line args: [u'-v', u'https:\/\/www.youtube.com\/watch?v=BaW_jenozKcj']\n[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251\n[debug] youtube-dl version 2015.12.06\n[debug] Git HEAD: 135392e\n[debug] Python version 2.6.6 - Windows-2003Server-5.2.3790-SP2\n[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4\n[debug] Proxy map: {}\n...\n<\/pre>\n\n\n\n<p><strong>\u4e0d\u8981\u53d1\u5e03\u8be6\u7ec6\u65e5\u5fd7\u7684\u5c4f\u5e55\u622a\u56fe\uff1b\u53ea\u6709\u7eaf\u6587\u672c\u662f\u53ef\u4ee5\u63a5\u53d7\u7684\u3002<\/strong><\/p>\n\n\n\n<p>\u8f93\u51fa\uff08\u5305\u62ec\u7b2c\u4e00\u884c\uff09\u5305\u542b\u91cd\u8981\u7684\u8c03\u8bd5\u4fe1\u606f\u3002\u6ca1\u6709\u5b8c\u6574\u8f93\u51fa\u7684\u95ee\u9898\u901a\u5e38\u65e0\u6cd5\u91cd\u73b0\uff0c\u56e0\u6b64\u5373\u4f7f\u6709\uff0c\u4e5f\u65e0\u6cd5\u5728\u77ed\u65f6\u95f4\u5185\u89e3\u51b3\u3002<\/p>\n\n\n\n<p>\u8bf7\u518d\u6b21\u91cd\u8bfb\u60a8\u7684\u95ee\u9898\uff0c\u4ee5\u907f\u514d\u51fa\u73b0\u4e00\u4e9b\u5e38\u89c1\u9519\u8bef\uff08\u60a8\u53ef\u4ee5\u4e5f\u5e94\u8be5\u5c06\u6b64\u4f5c\u4e3a\u6e05\u5355\uff09\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#is-the-description-of-the-issue-itself-sufficient\"><\/a>\u5bf9\u95ee\u9898\u672c\u8eab\u7684\u63cf\u8ff0\u662f\u5426\u8db3\u591f\uff1f<\/h3>\n\n\n\n<p>\u6211\u4eec\u7ecf\u5e38\u6536\u5230\u6211\u4eec\u65e0\u6cd5\u771f\u6b63\u7834\u8bd1\u7684\u95ee\u9898\u62a5\u544a\u3002\u867d\u7136\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u6700\u7ec8\u5728\u591a\u6b21\u8be2\u95ee\u540e\u83b7\u5f97\u4e86\u6240\u9700\u7684\u4fe1\u606f\uff0c\u4f46\u8fd9\u5bf9\u6211\u4eec\u7684\u8d44\u6e90\u9020\u6210\u4e86\u4e0d\u5fc5\u8981\u7684\u6d88\u8017\u3002\u8bb8\u591a\u8d21\u732e\u8005\uff0c\u5305\u62ec\u6211\uff0c\u4e5f\u4e0d\u662f\u6bcd\u8bed\u8005\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u80fd\u4f1a\u8bef\u8bfb\u4e00\u4e9b\u90e8\u5206\u3002<\/p>\n\n\n\n<p>\u56e0\u6b64\uff0c\u8bf7\u8be6\u7ec6\u8bf4\u660e\u60a8\u8bf7\u6c42\u7684\u529f\u80fd\uff0c\u6216\u8005\u60a8\u5e0c\u671b\u4fee\u590d\u54ea\u4e9b\u9519\u8bef\u3002\u786e\u4fdd\u5b83\u5f88\u660e\u663e<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u95ee\u9898\u662f\u4ec0\u4e48<\/li><li>\u5982\u4f55\u4fee\u590d\u5b83<\/li><li>\u60a8\u63d0\u8bae\u7684\u89e3\u51b3\u65b9\u6848\u4f1a\u662f\u4ec0\u4e48\u6837\u5b50<\/li><\/ul>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u62a5\u544a\u77ed\u4e8e\u4e24\u884c\uff0c\u5b83\u51e0\u4e4e\u53ef\u4ee5\u80af\u5b9a\u9057\u6f0f\u4e86\u5176\u4e2d\u4e00\u4e9b\uff0c\u8fd9\u4f7f\u5f97\u6211\u4eec\u5f88\u96be\u5bf9\u6b64\u505a\u51fa\u56de\u5e94\u3002\u6211\u4eec\u901a\u5e38\u8fc7\u4e8e\u793c\u8c8c\uff0c\u65e0\u6cd5\u76f4\u63a5\u89e3\u51b3\u95ee\u9898\uff0c\u4f46\u7f3a\u5c11\u7684\u4fe1\u606f\u53ef\u80fd\u4f1a\u9020\u6210\u8bef\u89e3\u3002\u4f5c\u4e3a\u4e00\u540d\u627f\u8bfa\u8005\uff0c\u6211\u7ecf\u5e38\u5bf9\u8fd9\u4e9b\u95ee\u9898\u611f\u5230\u6cae\u4e27\uff0c\u56e0\u4e3a\u6211\u63a8\u8fdb\u8fd9\u4e9b\u95ee\u9898\u7684\u552f\u4e00\u53ef\u80fd\u65b9\u6cd5\u662f\u4e00\u904d\u53c8\u4e00\u904d\u5730\u8981\u6c42\u6f84\u6e05\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u9519\u8bef\u62a5\u544a\uff0c\u8fd9\u610f\u5473\u7740\u5f53\u4f7f\u7528<code>-v<\/code>\u6807\u5fd7\u8c03\u7528\u65f6\uff0c\u60a8\u7684\u62a5\u544a\u5e94\u5305\u542byoutube-dl<em>\u7684\u5b8c\u6574<\/em>\u8f93\u51fa\u3002\u60a8\u6536\u5230\u7684\uff08\u5927\u591a\u6570\uff09\u9519\u8bef\u6d88\u606f\u751a\u81f3\u662f\u8fd9\u6837\u8bf4\u7684\uff0c\u4f46\u60a8\u4e0d\u4f1a\u76f8\u4fe1\u6211\u4eec\u7684\u9519\u8bef\u62a5\u544a\u4e2d\u6709\u591a\u5c11\u4e0d\u5305\u542b\u6b64\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u670d\u52a1\u5668\u6709\u591a\u4e2aIP\uff0c\u6216\u8005\u60a8\u6000\u7591\u5b58\u5728\u5ba1\u67e5\uff0c\u6dfb\u52a0<code>--call-home<\/code>\u53ef\u80fd\u662f\u83b7\u5f97\u66f4\u591a\u8bca\u65ad\u7684\u597d\u4e3b\u610f\u3002\u5982\u679c\u9519\u8bef\u662f<code>ERROR: Unable to extract ...<\/code>\u5e76\u4e14\u60a8\u65e0\u6cd5\u4ece\u591a\u4e2a\u56fd\u5bb6\u91cd\u73b0\u5b83\uff0c\u8bf7\u6dfb\u52a0<code>--dump-pages<\/code>\uff08\u8b66\u544a\uff1a\u8fd9\u5c06\u4ea7\u751f\u76f8\u5f53\u5927\u7684\u8f93\u51fa\uff0c\u901a\u8fc7\u5c06<code>&gt;log.txt 2&gt;&amp;1<\/code>\u6dfb\u52a0\u5230\u547d\u4ee4\u884c\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6<code>log.txt<\/code>\uff09\uff0c\u6216\u4e0a\u4f20\u60a8\u5728<a href=\"https:\/\/gist.github.com\/\">\u67d0\u4e2a\u5730\u65b9<\/a>\u6dfb\u52a0<code>--write-pages<\/code>\u65f6\u83b7\u5f97\u7684<code>.dump<\/code>\u6587\u4ef6\u3002<\/p>\n\n\n\n<p><strong>\u7ad9\u70b9\u652f\u6301\u8bf7\u6c42\u5fc5\u987b\u5305\u542b\u793a\u4f8b URL<\/strong>\u3002\u793a\u4f8bURL\u662f\u60a8\u53ef\u80fd\u60f3\u8981\u4e0b\u8f7d\u7684URL\uff0c\u4f8b\u5982<code>https:\/\/www.youtube.com\/watch?v=BaW_jenozKc<\/code>\u3002\u5e94\u8be5\u6709\u4e00\u4e2a\u660e\u663e\u7684\u89c6\u9891\u3002\u9664\u975e\u5e38\u7279\u6b8a\u7684\u60c5\u51b5\u5916\uff0c\u89c6\u9891\u670d\u52a1\u7684\u4e3b\u9875\uff08\u4f8b\u5982<code>https:\/\/www.youtube.com\/<\/code>\uff09<em>\u4e0d\u662f<\/em>\u793a\u4f8bURL\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#are-you-using-the-latest-version\"><\/a>\u4f60\u5728\u4f7f\u7528\u6700\u65b0\u7248\u672c\u5417\uff1f<\/h3>\n\n\n\n<p>\u5728\u62a5\u544a\u4efb\u4f55\u95ee\u9898\u4e4b\u524d\uff0c\u8bf7\u952e\u5165<code>youtube-dl -U<\/code>\u3002\u8fd9\u5e94\u8be5\u4f1a\u62a5\u544a\u60a8\u662f\u6700\u65b0\u7684\u3002\u6211\u4eec\u6536\u5230\u7684\u5927\u7ea620%\u7684\u62a5\u544a\u5df2\u7ecf\u4fee\u590d\uff0c\u4f46\u4eba\u4eec\u6b63\u5728\u4f7f\u7528\u8fc7\u65f6\u7684\u7248\u672c\u3002\u529f\u80fd\u8bf7\u6c42\u4e5f\u9002\u7528\u4e8e\u6b64\u9879\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#is-the-issue-already-documented\"><\/a>\u95ee\u9898\u662f\u5426\u5df2\u7ecf\u8bb0\u5f55\u5728\u6848\uff1f<\/h3>\n\n\n\n<p>\u786e\u4fdd\u6709\u4eba\u8fd8\u6ca1\u6709\u6253\u5f00\u60a8\u5c1d\u8bd5\u6253\u5f00\u7684\u95ee\u9898\u3002\u5728\u7a97\u53e3\u9876\u90e8\u641c\u7d22\u6216\u6d4f\u89c8\u6b64\u5b58\u50a8\u5e93\u7684<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/search?type=Issues\">GitHub\u95ee\u9898<\/a>\u3002\u5982\u679c\u6709\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u5199\u4e00\u4e9b\u5927\u610f\u4e3a\u201c\u8fd9\u4e5f\u4f1a\u5f71\u54cd\u6211\uff0c\u7248\u672c\u4e3a2015.01.01\u3002\u4ee5\u4e0b\u662f\u6709\u5173\u8be5\u95ee\u9898\u7684\u66f4\u591a\u4fe1\u606f\uff1a&#8230;&#8230;\u201d\u3002\u867d\u7136\u6709\u4e9b\u95ee\u9898\u53ef\u80fd\u5f88\u65e7\uff0c\u4f46\u5176\u4e2d\u7684\u65b0\u5e16\u5b50\u901a\u5e38\u4f1a\u523a\u6fc0\u5feb\u901f\u6d3b\u52a8\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#why-are-existing-options-not-enough\"><\/a>\u4e3a\u4ec0\u4e48\u73b0\u6709\u9009\u9879\u4e0d\u591f\uff1f<\/h3>\n\n\n\n<p>\u5728\u8bf7\u6c42\u65b0\u529f\u80fd\u4e4b\u524d\uff0c\u8bf7\u5feb\u901f\u67e5\u770b<a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#options\">\u652f\u6301\u7684\u9009\u9879\u5217\u8868<\/a>\u3002\u8bb8\u591a\u529f\u80fd\u8bf7\u6c42\u90fd\u662f\u9488\u5bf9\u5b9e\u9645\u4e0a\u5df2\u7ecf\u5b58\u5728\u7684\u529f\u80fd\uff01\u8bf7\u7edd\u5bf9\u5728\u95ee\u9898\u62a5\u544a\u4e2d\u5c55\u793a\u60a8\u7684\u5de5\u4f5c\uff0c\u5e76\u8be6\u7ec6\u8bf4\u660e\u73b0\u6709\u7684\u7c7b\u4f3c\u9009\u9879\u5982\u4f55\u89e3\u51b3\u60a8\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#is-there-enough-context-in-your-bug-report\"><\/a>\u60a8\u7684\u9519\u8bef\u62a5\u544a\u4e2d\u6709\u8db3\u591f\u7684\u4e0a\u4e0b\u6587\u5417\uff1f<\/h3>\n\n\n\n<p>\u4eba\u4eec\u60f3\u89e3\u51b3\u95ee\u9898\uff0c\u5e76\u4e14\u901a\u5e38\u8ba4\u4e3a\u4ed6\u4eec\u5e2e\u4e86\u6211\u4eec\u4e00\u4e2a\u5fd9\uff0c\u5c06\u4ed6\u4eec\u66f4\u5927\u7684\u95ee\u9898\uff08\u4f8b\u5982\uff0c\u60f3\u8df3\u8fc7\u5df2\u7ecf\u4e0b\u8f7d\u7684\u6587\u4ef6\uff09\u5206\u89e3\u4e3a\u7279\u5b9a\u8bf7\u6c42\uff08\u4f8b\u5982\uff0c\u8981\u6c42\u6211\u4eec\u5728\u4e0b\u8f7d\u4fe1\u606f\u9875\u9762\u4e4b\u524d\u67e5\u770b\u6587\u4ef6\u662f\u5426\u5b58\u5728\uff09\u3002\u7136\u800c\uff0c\u7ecf\u5e38\u53d1\u751f\u7684\u662f\uff0c\u4ed6\u4eec\u5c06\u95ee\u9898\u5206\u4e3a\u4e24\u4e2a\u6b65\u9aa4\uff1a\u4e00\u4e2a\u7b80\u5355\uff0c\u4e00\u4e2a\u4e0d\u53ef\u80fd\uff08\u6216\u6781\u5176\u590d\u6742\uff09\u3002<\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u5f53\u539f\u59cb\u95ee\u9898\u53ef\u4ee5\u66f4\u5bb9\u6613\u5730\u89e3\u51b3\u65f6\uff0c\u6211\u4eec\u4f1a\u6536\u5230\u4e00\u4e2a\u975e\u5e38\u590d\u6742\u7684\u8bf7\u6c42\uff0c\u4f8b\u5982\u5c06\u4e0b\u8f7d\u7684\u89c6\u9891ID\u8bb0\u5f55\u5728\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u60a8\u5fc5\u987b\u5728\u4e0d\u660e\u663e\u7684\u60c5\u51b5\u4e0b\u5305\u542b\u66f4\u5927\u7684\u4e0a\u4e0b\u6587\u3002\u7279\u522b\u662f\uff0c\u6bcf\u4e2a\u4e0d\u5305\u542b\u6dfb\u52a0\u5bf9\u65b0\u7ad9\u70b9\u652f\u6301\u7684\u529f\u80fd\u8bf7\u6c42\u90fd\u5e94\u5305\u542b\u4e00\u4e2a\u7528\u4f8b\u573a\u666f\uff0c\u89e3\u91ca\u5728\u4ec0\u4e48\u60c5\u51b5\u4e0b\u7f3a\u5931\u7684\u529f\u80fd\u4f1a\u6709\u7528\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#does-the-issue-involve-one-problem-and-one-problem-only\"><\/a>\u95ee\u9898\u662f\u5426\u6d89\u53ca\u4e00\u4e2a\u95ee\u9898\uff0c\u800c\u53ea\u6d89\u53ca\u4e00\u4e2a\u95ee\u9898\uff1f<\/h3>\n\n\n\n<p>\u6211\u4eec\u7684\u4e00\u4e9b\u7528\u6237\u4f3c\u4e4e\u8ba4\u4e3a\u4ed6\u4eec\u53ef\u4ee5\u6216\u5e94\u8be5\u6253\u5f00\u7684\u95ee\u9898\u662f\u6709\u9650\u7684\u3002\u4ed6\u4eec\u80fd\u591f\u6216\u5e94\u8be5\u6253\u5f00\u7684\u95ee\u9898\u6ca1\u6709\u9650\u5236\u3002\u867d\u7136\u80fd\u591f\u5c06\u60a8\u7684\u6240\u6709\u95ee\u9898\u8f6c\u50a8\u5230\u4e00\u5f20\u7968\u636e\u4e2d\u4f3c\u4e4e\u5f88\u6709\u5438\u5f15\u529b\uff0c\u4f46\u8fd9\u610f\u5473\u7740\u89e3\u51b3\u60a8\u5176\u4e2d\u4e00\u4e2a\u95ee\u9898\u7684\u4eba\u4e0d\u80fd\u5c06\u95ee\u9898\u6807\u8bb0\u4e3a\u5df2\u5173\u95ed\u3002\u901a\u5e38\uff0c\u62a5\u544a\u4e00\u5806\u95ee\u9898\u4f1a\u5bfc\u81f4\u7968\u52a1\u6325\u4e4b\u4e0d\u53bb\uff0c\u56e0\u4e3a\u6ca1\u6709\u4eba\u60f3\u653b\u51fb\u90a3\u4e2a\u5e9e\u7136\u5927\u7269\uff0c\u76f4\u5230\u6709\u4eba\u4ec1\u6148\u5730\u5c06\u95ee\u9898\u5206\u6210\u591a\u4e2a\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u7279\u522b\u662f\uff0c\u6bcf\u4e2a\u7ad9\u70b9\u652f\u6301\u8bf7\u6c42\u95ee\u9898\u90fd\u5e94\u4ec5\u6d89\u53ca\u4e00\u4e2a\u7ad9\u70b9\u7684\u670d\u52a1\uff08\u901a\u5e38\u5728\u516c\u5171\u57df\u4e0b\uff0c\u4f46\u59cb\u7ec8\u4f7f\u7528\u76f8\u540c\u7684\u540e\u7aef\u6280\u672f\uff09\u3002\u5728\u540c\u4e00\u95ee\u9898\u4e0a\uff0c\u8bf7\u52ff\u8bf7\u6c42\u652f\u6301vimeo\u7528\u6237\u89c6\u9891\u3001\u767d\u5bab\u64ad\u5ba2\u548cGoogle Plus\u9875\u9762\u3002\u6b64\u5916\uff0c\u8bf7\u786e\u4fdd\u60a8\u4e0d\u4f1a\u5728\u529f\u80fd\u8bf7\u6c42\u65c1\u8fb9\u53d1\u5e03\u9519\u8bef\u62a5\u544a\u3002\u6839\u636e\u7ecf\u9a8c\uff0c\u529f\u80fd\u8bf7\u6c42\u4e0d\u5305\u62ec\u4e0e\u624b\u5934\u529f\u80fd\u65e0\u5173\u7684youtube-dl\u8f93\u51fa\u3002\u4e0d\u8981\u5728\u8bf7\u6c42\u65b0\u7684\u89c6\u9891\u670d\u52a1\u65f6\u53d1\u5e03\u7f51\u7edc\u9519\u8bef\u7684\u62a5\u544a\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#is-anyone-going-to-need-the-feature\"><\/a>\u6709\u4eba\u9700\u8981\u8fd9\u4e2a\u529f\u80fd\u5417\uff1f<\/h3>\n\n\n\n<p>\u4ec5\u53d1\u5e03\u60a8\uff08\u6216\u60a8\u53ef\u4ee5\u4eb2\u81ea\u4ea4\u8c08\u7684\u65e0\u884c\u4e3a\u80fd\u529b\u7684\u670b\u53cb\uff09\u6240\u9700\u7684\u529f\u80fd\u3002\u4e0d\u8981\u53d1\u5e03\u529f\u80fd\uff0c\u56e0\u4e3a\u5b83\u4eec\u770b\u8d77\u6765\u662f\u4e2a\u597d\u4e3b\u610f\u3002\u5982\u679c\u5b83\u4eec\u771f\u7684\u6709\u7528\uff0c\u5b83\u4eec\u5c06\u88ab\u9700\u8981\u5b83\u4eec\u7684\u4eba\u8981\u6c42\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#is-your-question-about-youtube-dl\"><\/a>\u4f60\u7684\u95ee\u9898\u662f\u5173\u4e8eyoutube-dl\u5417\uff1f<\/h3>\n\n\n\n<p>\u8fd9\u542c\u8d77\u6765\u53ef\u80fd\u5f88\u5947\u602a\uff0c\u4f46\u6211\u4eec\u6536\u5230\u7684\u4e00\u4e9b\u9519\u8bef\u62a5\u544a\u4e0eyoutube-dl\u5b8c\u5168\u65e0\u5173\uff0c\u5e76\u4e14\u4e0e\u4e0d\u540c\u7684\u5e94\u7528\u7a0b\u5e8f\u751a\u81f3\u8bb0\u8005\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u6709\u5173\u3002\u8bf7\u786e\u4fdd\u60a8\u5b9e\u9645\u4e0a\u4f7f\u7528\u7684\u662fyoutube-dl\u3002\u5982\u679c\u60a8\u6b63\u5728\u4e3ayoutube-dl\u4f7f\u7528UI\uff0c\u8bf7\u5411\u63d0\u4f9bUI\u7684\u5b9e\u9645\u5e94\u7528\u7a0b\u5e8f\u7684\u7ef4\u62a4\u8005\u62a5\u544a\u8be5\u9519\u8bef\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u5982\u679c\u60a8\u7684youtube-dl\u7528\u6237\u754c\u9762\u4ee5\u67d0\u79cd\u65b9\u5f0f\u5931\u8d25\uff0c\u60a8\u8ba4\u4e3a\u4e0eyoutube-dl\u6709\u5173\uff0c\u8bf7\u52a1\u5fc5\u7ee7\u7eed\u62a5\u544a\u8be5\u9519\u8bef\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\/blob\/master\/README.md#copyright\"><\/a>\u7248\u6743<\/h1>\n\n\n\n<p>youtube-dl\u7531\u7248\u6743\u6240\u6709\u8005\u53d1\u5e03\u5230\u516c\u5171\u9886\u57df\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2aREADME\u6587\u4ef6\u6700\u521d\u7531<a href=\"https:\/\/github.com\/dbbolton\">Daniel Bolton<\/a>\u7f16\u5199\uff0c\u540c\u6837\u53d1\u5e03\u5230\u516c\u5171\u9886\u57df\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>youtube-dl &#8211; \u4eceyoutu [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[253,2730,249],"tags":[356,484,491,465,2743,2740,2741,2742,464],"class_list":{"0":"post-2941","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-fun","7":"category-2730","8":"category-technology","9":"tag-youtube","10":"tag-youtube-dl","11":"tag-491","13":"tag-2743","14":"tag-2740","15":"tag-2741","16":"tag-2742","17":"tag-464"},"_links":{"self":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/2941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2941"}],"version-history":[{"count":32,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/2941\/revisions"}],"predecessor-version":[{"id":3018,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/2941\/revisions\/3018"}],"wp:attachment":[{"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zengqq.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}