火山小视频无水印解析

最近有几个小伙伴私信问我有没有火山小视频无水印的接口,趁着放假有时间就看了一下。

测试视频链接:

阿拉斯加萌宠家园在火山分享了视频,快来围观!传送门戳我>>http://reflow.huoshan.com/hotsoon/s/AAKNkQvt700/ 复制此链接,打开【火山小视频】,直接观看视频~

1.png

1:获取视频ID

访问分享过来的视频链接源码里面有一串Json


2.png
{
    "status": 102,
    "create_time": 1518497678,
    "video": {
        "width": 540,
        "ratio": 1.78,
        "duration": 15,
        "url_list": [
            "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=c576ecd6117d4179ac6b591b93c33194&line=0&app_id=1112&watermark=2",
            "http://hotsoon.snssdk.com/hotsoon/item/video/_playback/?video_id=c576ecd6117d4179ac6b591b93c33194&line=1&app_id=1112&watermark=2"
        ],
        "cover": {
            "url_list": [
                "http://p99.pstatp.com/large/6312000f72e9d582a190.jpg",
                "http://pb3.pstatp.com/large/6312000f72e9d582a190.jpg",
                "http://pb3.pstatp.com/large/6312000f72e9d582a190.jpg"
            ],
            "uri": "large/6312000f72e9d582a190"
        },
        "uri": "c576ecd6117d4179ac6b591b93c33194",
        "height": 960
    },
    "location": "鞍山",
    "media_type": 4,
    "text": "",
    "author": {
        "city": "盘锦",
        "fan_ticket_count": 5329,
        "avatar_large": {
            "url_list": [
                "http://sf6-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~1080x1080.jpg",
                "http://sf3-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~1080x1080.jpg",
                "http://sf1-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~1080x1080.jpg"
            ],
            "uri": "hotsoon-avatar/6549755897642486536"
        },
        "short_id": 106175299,
        "level": 1,
        "gender": 1,
        "app_id": 1112,
        "id_str": "59124343626",
        "avatar_medium": {
            "url_list": [
                "http://sf6-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~720x720.jpg",
                "http://sf3-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~720x720.jpg",
                "http://sf1-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~720x720.jpg"
            ],
            "uri": "hotsoon-avatar/6549755897642486536"
        },
        "signature": "\n\n个性签名 3142 83788\n\n",
        "avatar_thumb": {
            "url_list": [
                "http://sf6-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~100x100.jpg",
                "http://sf3-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~100x100.jpg",
                "http://sf1-hscdn-tos.pstatp.com/img/hotsoon-avatar/6549755897642486536~100x100.jpg"
            ],
            "uri": "hotsoon-avatar/6549755897642486536"
        },
        "nickname": "阿拉斯加萌宠家园",
        "id": 59124343626
    },
    "sharer": {
        "city": "",
        "fan_ticket_count": 0,
        "level": 1,
        "gender": 0,
        "id_str": "0",
        "signature": "",
        "nickname": "0",
        "id": 0
    },
    "id": "6521897866414263555",
    "stats": {
        "play_count": 380230,
        "share_count": 1289,
        "ticket": 554,
        "digg_count": 9564,
        "income": 5540
    }
}

格式化后:


3.png

视频ID:JSON.video.uri

"uri": "c576ecd6117d4179ac6b591b93c33194"

2:通过接口获取无水印直链

“https://api-hl.huoshan.com/hotsoon/item/video/_playback/?video_id=” + 视频ID + “&line=0&app_id=1112&vquality=normal&watermark=0&long_video=0&sf=1"

替换测试视频的视频ID后如下:

https://api-hl.huoshan.com/hotsoon/item/video/_playback/?video_id=c576ecd6117d4179ac6b591b93c33194&line=0&app_id=1112&vquality=normal&watermark=0&long_video=0&sf=1

你可能感兴趣的:(火山小视频无水印解析)