zoukankan      html  css  js  c++  java
  • 下载腾讯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 Filespython36python.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的方法,找到其元素节点位置。

     

  • 相关阅读:
    evernote100个做笔记的好方法
    平衡二叉树的调整模版
    晨间日记的奇迹
    hdu 2952 Counting Sheep
    hdu 1535 Invitation Cards
    poj 3259 Wormholes(spfa)
    poj 2263 Heavy Cargo(floyd)
    poj 3268 Silver Cow Party(SPFA)
    hdu 1690 Bus System
    hdu 3631 Shortest Path(Floyd)
  • 原文地址:https://www.cnblogs.com/dalyday/p/11380422.html
Copyright © 2011-2022 走看看