Descargue el video de la estación b a la computadora [Pro-test efectivo]
Método 1: use el proyecto python de código abierto de github ---
método de obtención de datos Características: fácil de descargar, velocidad rápida, velocidad garantizada 3 M / s más rápida que Thunder, y parece descargarse de forma predeterminada Es la versión más clara. ¡Lo que descargué es el más claro por defecto! Admite muchos sitios web en el país y en el extranjero: el
método de operación es:
(1) Descargar e instalar python3.7 (el más reciente)
(2) pip3 install you-get
(3) Ingrese "you-get video link" en la herramienta de línea de comandos y haga clic en el botón "Enter" Puedes descargarlo.
Por ejemplo: obtienes https://www.bilibili.com/video/BV1LJ411Y7og?p=6
PD: Otras habilidades prácticas
(1) you-get -i URL vista previa de los parámetros de formato de cada calidad de imagen (solo vista previa, no descarga):
tenga en cuenta que hay una "-i" adicional aquí, puede obtener una vista previa de la descarga primero si la agrega Selección de calidad de imagen, puede ver superdefinición, alta definición, definición estándar y definición de escoria.
you-get -i https://www.bilibili.com/video/BV1LJ411Y7og?p=3
(2) you-get --format = dash-flv URL para descargar el video con los parámetros de calidad de imagen especificados:
reemplazamos la URL con el enlace del video, ingresamos, ingresamos, y puede descargar la calidad de imagen 1080P.
you-get --format = dash-flv https://www.bilibili.com/video/BV1LJ411Y7og?p=3
==============
Además, debido a que un video especial de bili cambia el número de página detrás, ¡puedes escribir un murciélago para descargar por lotes!
Otros métodos: consulte la columna:
https://www.zhihu.com/question/41367609 El
método en este artículo también es de este enlace
Observaciones: Debe ser el entorno python3. El siguiente es el sistema centos7 de mi empresa, el python2 predeterminado, probé python2 pero no funciona, sé que después de instalar yum install python3 directamente, se puede usar de la siguiente manera:
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]# python
Python 2.7.5 (default, Jun 17 2014, 18:11:42)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>>
>>> quit()
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]# pip install you-get
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:380: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
SNIMissingWarning,
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:139: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning,
Collecting you-get
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:139: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning,
Downloading https://files.pythonhosted.org/packages/ac/51/a4d8efe889cb550f3269a2fa4f445bb8969a5160ab6edc83f36d60bb3c1a/you-get-0.4.1456.tar.gz (158kB)
|████████████████████████████████| 163kB 55kB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-yQslu5/you-get/setup.py'"'"'; __file__='"'"'/tmp/pip-install-yQslu5/you-get/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-yQslu5/you-get/pip-egg-info
cwd: /tmp/pip-install-yQslu5/you-get/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-yQslu5/you-get/setup.py", line 10, in <module>
proj_info = json.loads(open(os.path.join(here, PROJ_METADATA), encoding='utf-8').read())
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
/usr/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:139: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning,
WARNING: You are using pip version 19.3.1; however, version 20.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]# you-get
-bash: you-get: 未找到命令
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]# yum install python3
已加载插件:fastestmirror
Repository base is listed more than once in the configuration
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
zabbix | 2.9 kB 00:00:00
zabbix-non-supported | 951 B 00:00:00
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 python3.x86_64.0.3.6.8-13.el7 将被 安装
--> 正在处理依赖关系 python3-libs(x86-64) = 3.6.8-13.el7,它被软件包 python3-3.6.8-13.el7.x86_64 需要
--> 正在处理依赖关系 python3-setuptools,它被软件包 python3-3.6.8-13.el7.x86_64 需要
--> 正在处理依赖关系 python3-pip,它被软件包 python3-3.6.8-13.el7.x86_64 需要
--> 正在处理依赖关系 libpython3.6m.so.1.0()(64bit),它被软件包 python3-3.6.8-13.el7.x86_64 需要
--> 正在检查事务
---> 软件包 python3-libs.x86_64.0.3.6.8-13.el7 将被 安装
--> 正在处理依赖关系 libtirpc.so.1()(64bit),它被软件包 python3-libs-3.6.8-13.el7.x86_64 需要
---> 软件包 python3-pip.noarch.0.9.0.3-7.el7_7 将被 安装
---> 软件包 python3-setuptools.noarch.0.39.2.0-10.el7 将被 安装
--> 正在检查事务
---> 软件包 libtirpc.x86_64.0.0.2.4-0.16.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
=========================================================================================================
Package 架构 版本 源 大小
=========================================================================================================
正在安装:
python3 x86_64 3.6.8-13.el7 base 69 k
为依赖而安装:
libtirpc x86_64 0.2.4-0.16.el7 base 89 k
python3-libs x86_64 3.6.8-13.el7 base 7.0 M
python3-pip noarch 9.0.3-7.el7_7 updates 1.8 M
python3-setuptools noarch 39.2.0-10.el7 base 629 k
事务概要
=========================================================================================================
安装 1 软件包 (+4 依赖软件包)
总下载量:9.5 M
安装大小:48 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): libtirpc-0.2.4-0.16.el7.x86_64.rpm | 89 kB 00:00:00
(2/5): python3-3.6.8-13.el7.x86_64.rpm | 69 kB 00:00:00
(3/5): python3-setuptools-39.2.0-10.el7.noarch.rpm | 629 kB 00:00:01
(4/5): python3-pip-9.0.3-7.el7_7.noarch.rpm | 1.8 MB 00:00:02
(5/5): python3-libs-3.6.8-13.el7.x86_64.rpm | 7.0 MB 00:00:18
---------------------------------------------------------------------------------------------------------
总计 530 kB/s | 9.5 MB 00:00:18
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : libtirpc-0.2.4-0.16.el7.x86_64 1/5
正在安装 : python3-setuptools-39.2.0-10.el7.noarch 2/5
正在安装 : python3-libs-3.6.8-13.el7.x86_64 3/5
正在安装 : python3-3.6.8-13.el7.x86_64 4/5
正在安装 : python3-pip-9.0.3-7.el7_7.noarch 5/5
验证中 : python3-pip-9.0.3-7.el7_7.noarch 1/5
验证中 : python3-3.6.8-13.el7.x86_64 2/5
验证中 : libtirpc-0.2.4-0.16.el7.x86_64 3/5
验证中 : python3-setuptools-39.2.0-10.el7.noarch 4/5
验证中 : python3-libs-3.6.8-13.el7.x86_64 5/5
已安装:
python3.x86_64 0:3.6.8-13.el7
作为依赖被安装:
libtirpc.x86_64 0:0.2.4-0.16.el7 python3-libs.x86_64 0:3.6.8-13.el7
python3-pip.noarch 0:9.0.3-7.el7_7 python3-setuptools.noarch 0:39.2.0-10.el7
完毕!
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]# python3
Python 3.6.8 (default, Apr 2 2020, 13:34:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> quit()
[root@nessus ~]# pip3 install you-get
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting you-get
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/9b/2c/9cb2637be0f09499bcb54fdec2f58ae7fabb2a347c94f62b19bdd7ed450e/you_get-0.4.1456-py3-none-any.whl (217kB)
100% |████████████████████████████████| 225kB 120kB/s
Installing collected packages: you-get
Successfully installed you-get-0.4.1456
[root@nessus ~]#
[root@nessus ~]#
[root@nessus ~]# you-get https://www.bilibili.com/video/BV1LJ411Y7og?p=3
you-get: This is a multipart video. (use --playlist to download all parts.)
site: Bilibili
title: 老男孩教育 openstack全新架构实战 (P3. 03-openstack的基础服务安装)
stream:
- format: flv
container: flv
quality: 高清 1080P
size: 102.3 MiB (107239520 bytes)
# download-with: you-get --format=flv [URL]
Downloading 老男孩教育 openstack全新架构实战 (P3. 03-openstack的基础服务安装).flv ...
2.4% ( 2.5/102.3MB) ├██───────────────────────────────────────────────────────────────┤[1/1] 67 kB/s