Giter Club home page Giter Club logo

video_spider's Introduction

video_spider

声明:仅供学习使用,切勿用于其他用途

今日头条视频

今日头条 toutiao_video.py

逻辑分析
1 先通过今日头条APP,charles抓包工具抓包,抓取视频列表页接口,列表页可改变部分参数,一直循环获取.(注意:要加延迟,友好一点,不对服务器造成负担)
2 循环列表页,访问详细页, 通过正则获取videoId.
3 通过接口 http://i.snssdk.com/video/urls/1/toutiao/mp4/{videoId} 获取原视频详细信息: 如 http://i.snssdk.com/video/urls/1/toutiao/mp4/v02004d10000bfhquksuatle7ofug3v0
4 原视频详细信息,有不同清晰度的,选择一个清晰度的main_url 然后base64解码 就得到了原视频链接,注意原视频链接是有时间限制的。

🍉西瓜视频

西瓜视频 xi_gua.py

腾讯视频

原始url 源视频连接获取方式 腾讯视频 tencent_video.py

抖音分享链接解析

抖音分享链接解析,获取无水印视频链接

解析逻辑

注意:全程得用移动端ua才行(以下测试全程用的iPhone7UA),chrome直接打不开。

已使用FastAPI封装 成接口, 测试分享短链接: https://v.douyin.com/JPa1xhq/

API解析分享返回json数据示例
{
    "code": 200,
    "msg": "success",
    "data": {
        "videoUrl": "https://aweme.snssdk.com/aweme/v1/play/?video_id=v0300f9f0000bu3ctfaajd99kv7dbidg&ratio=720p&line=0",
        "videoId": "v0300f9f0000bu3ctfaajd99kv7dbidg",
        "title": "重庆,迷一样的城市 这样的道路是来考验技术的#重庆美好推荐官  #我的家乡在重庆   #神操作  #心动的旅行",
        "cover": [
            "https://p3-dy-ipv6.byteimg.com/img/tos-cn-i-0813/48f2b080e29a45088c896249d8294455~tplv-dmt-logoccm:300:400:tos-cn-i-0813/f7008a75e28f406dac080d2048f33540.jpeg?from=2563711402_large",
            "https://p1-dy-ipv6.byteimg.com/img/tos-cn-i-0813/48f2b080e29a45088c896249d8294455~tplv-dmt-logoccm:300:400:tos-cn-i-0813/f7008a75e28f406dac080d2048f33540.jpeg?from=2563711402_large",
            "https://p29-dy.byteimg.com/img/tos-cn-i-0813/48f2b080e29a45088c896249d8294455~tplv-dmt-logoccm:300:400:tos-cn-i-0813/f7008a75e28f406dac080d2048f33540.jpeg?from=2563711402_large"
        ]
    }
}

m3u8 视频下载

m3u8_down 仅供参考

video_spider's People

Contributors

wxy2077 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.