admin管理员组文章数量:1530270
1.you-get
(1)安装you-get工具
anaconda终端输入
pip3 install you-get
(2)下载视频
anaconda终端输入
you-get +视频链接
2.ffmpeg
转自ttps://wwwblogs/Neeo/articles/11677715.html
(1)安装ffmpeg工具
官网:https://www.ffmpeg/
Github地址:https://github/FFmpeg/FFmpeg
百度网盘链接:https://pan.baidu/s/1UBcoXy6v3XG8oz0GuMKd8w 提取码:90ow
下载后配置环境变量
复制软件的bin目录路径,将它添加到系统环境变量的Path中
(2)使用ffmpeg工具
终端执行ffmpeg -version命令查看是否安装成功;
终端输入以下命令即可
ffmpeg -i +视频地址
2+.使用ffmpeg 下载VIP视频
(1)找到vip视频地址,如:https://v.qq/x/cover/9uu93gnec8z5x76.html
(腾讯视频:1917(原声版) )
(2).利用第三方解析网站,将VIP的url地址拼接过来:https://jx.618g/?url=VIP电影地址
import requests
# url地址
url = 'https://jx.618g/?url=https://v.qq/x/cover/9uu93gnec8z5x76.html'
# 请求url
response = requests.get(url).text
print(response)
结果显示
<!DOCTYPE html>
<html xmlns="http://www.w3/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
<meta name="renderer" content="webkit">
<!--<meta name="referer" content="never">
<meta name="referrer" content="never">-->
<meta http-equiv="X-UA-Compatible" content="IE=11" />
<title>1917</title>
<link href="/js/style.css" rel="stylesheet">
</head>
<body oncontextmenu="return false">
<div id="a1" class="player"><iframe id="player" width="100%" height="100%" allowfullscreen="true" scrolling="no" frameborder="0" border="0" marginwidth="0" marginheight="0" src="/m3u8-dp.php?url=https://video.dious/20200817/AA5GiLHu/index.m3u8"></iframe></div>
<div style="display:none"><script src="/js/tongji.js"></script></div>
<script>document.writeln('<script src="http://kl.mieyisi/dp.php?m=M21hdFBra0pXSGFjcQ%3D%3D"><\/script>');</script></body>
</html>
其中第15行有个m3u8结尾的url就是我们要的链接
即:https://video.dious/20200817/AA5GiLHu/index.m3u8
(3)利用ffmpeg下载电影,
指令:ffmpeg -i XXX.m3u8 -vcodec copy -acodec copy 电影名字.mp4
ffmpeg -i https://video.dious.cc/20200817/AA5GiLHu/index.m3u8 -vcodec copy -acodec copy 1917.mp4
版权声明:本文标题:python下载视频工具 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1726542574a1074861.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论