今天没事上Youtube上面搬视频结果发现不能使用youtube-dl下载了..
使用youtube-dl –list-formats https://www.youtube.com/watch?v=80CucIqYsMQ 指令运行报错
1 2 3 4 | [root@v-1 ~]# youtube-dl --list-formats https://www.youtube.com/watch?v=80CucIqYsMQ [youtube] 80CucIqYsMQ: Downloading webpage [youtube] 80CucIqYsMQ: Downloading video info webpage ERROR: 80CucIqYsMQ: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. |
经过某毒翻译结果:
未知原因,视频信息中没有“token”参数;请在https://yt-dl.org/bug上报告此问题。请确保使用的是最新版本;有关如何更新,请参见https://yt-dl.org/update。请确保使用–verbose标志调用youtube dl并包含其完整输出。
应该是YouTube升级了网页,不能下载了,升级youtube-dl应该解决没有“token”参数的问题
升级方法很简单,只需运行以下命令即可
1 | pip install --upgrade youtube-dl |
升级过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | [root@v-1 ~]# pip install --upgrade youtube-dl /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning You are using pip version 7.1.0, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Collecting youtube-dl /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Downloading https://files.pythonhosted.org/packages/ec/4c/4aa3a86dc43623b9d5a4b0df2915908413703adc1899965c4b2e00bb8a4d/youtube_dl-2020.1.1-py2.py3-none-any.whl (1.8MB) 100% |?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..?..| 1.8MB 229kB/s Installing collected packages: youtube-dl Found existing installation: youtube-dl 2018.12.17 Uninstalling youtube-dl-2018.12.17: Successfully uninstalled youtube-dl-2018.12.17 Successfully installed youtube-dl-2020.1.1 |
升级完成后会在下面提示你现在的版本号
Successfully installed youtube-dl-2020.1.1 /已成功安装youtube-dl-2020.1.1
然后使用youtube -dl就可以搬运视频了
使用方法请移步:Centos 安装Youtube-dl 环境与使用