下載騰訊VIP視頻


1.找到自己想看的VIP視頻網頁地址,比如我就喜歡看一周一更的天行九歌,鏈接地址:https://v.qq.com/x/cover/rm3tmmat4li8uul/i0031xd1vjf.html

2.利用第三方解析網站,全名解析,將VIP的url地址拼接過來:https://jx.618g.com/?url=VIP電影地址

import requests

# url地址
url = 'https://jx.618g.com/?url=https://v.qq.com/x/cover/rm3tmmat4li8uul/i0031xd1vjf.html'

# 請求url
response = requests.get(url).text
print(response)

# 打印響應結果

"D:\Program Files\python36\python.exe" D:/daly/pycharm/test/test2.py
<!DOCTYPE html>
<html xmlns="http://www.w3.org/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>天行九歌 第78集</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.php?url=https://tudou.com-l-tudou.com/20190816/22117_5358e151/index.m3u8"></iframe></div>
<div style="display:none"><script src="/js/tongji.js"></script></div>
<div style="display:none"><script>var n=Math.floor(Math.random()*10);
if(n<2){
}else{
}
document.writeln('<script src="https://vip.dyi5.com/xxd.php?id=275"><\/script>');
</script></div></body>
</html>

# 上面打印內容第15行有個m3u8結尾的url就是我們要的結果,有些人問為啥不直接鼠標右鍵檢查?這些網站基本都做了反爬,右鍵的檢查,F12行不通;

3.利用ffmpeg下載電影,指令:ffmpeg -i XXX.m3u8 -vcodec copy -acodec copy 電影名字.mp4,如果沒有安裝ffmpeg,請戳:https://www.cnblogs.com/dalyday/p/11380252.html

# ffmpeg -i https://tudou.com-l-tudou.com/20190816/22117_5358e151/index.m3u8 -vcodec copy -acodec copy 天行九歌.mp4

4.結果:

5.問題總結:

# 如果這個第三方解析網站不一定能找出u3m8的url的地址,可以更換其他的第三方解析網站;

# 想要快速找到u3m8的url的地址,可以通過xpath或re的方法,找到其元素節點位置。

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM