(抖音,火山,最右,微视,皮皮虾)短视频去水印

服务器配置特别特别低,建议不要频繁下载

接口文档

接口 说明 请求方式 参数 参数说明
/analy/getNoWatermarkUrl 获取无水印地址 get url 复制地址里的地址
/analy/download 下载无水印视频 get url 复制地址里的地址
/analy/watch 观看无水印视频 get url 复制地址里的地址

获取无水印地址 返回示例

{
    "status": 200,
    "subMsg": "",
    "msg": "原视频地址获取成功",
    "data": "https://aweme.snssdk.com/aweme/v1/play/?s_vid=93f1b41336a8b7a442dbf1c29c6bbc56de9102d5b922e5455098d6aa1822fedc5bcfef438f649e3b63bfac6446a354c3b69db4e829abea700a7ae8006d33b3c6&line=0",
    "version": "1.0"
}

示例:

获取无水印地址

抖音: http://123.206.19.217:8484/analy/getNoWatermarkUrl?url=http://v.douyin.com/uWJyw2/
火山: http://123.206.19.217:8484/analy/getNoWatermarkUrl?url=https://reflow.huoshan.com/hotsoon/s/OKIHYfwx700/
皮皮虾: http://123.206.19.217:8484/analy/getNoWatermarkUrl?url=https://h5.pipix.com/s/uwYSfq/
微视: http://123.206.19.217:8484/analy/getNoWatermarkUrl?url=https://h5.weishi.qq.com/weishi/feed/6Ytqpd2Qe1Idu3XXg/wsfeed?wxplay=1&id=6Ytqpd2Qe1Idu3XXg&spid=7657783424487211136&qua=v1_iph_weishi_6.0.2_126_app_a&chid=100081014&pkg=3670&attach=cp_reserves3_1000370011
最右: http://123.206.19.217:8484/analy/getNoWatermarkUrl?url=https://h5.izuiyou.com/detail/130327684?zy_to=applink&to=applink

下载无水印视频

抖音: http://123.206.19.217:8484/analy/download?url=http://v.douyin.com/uWJyw2/
火山: http://123.206.19.217:8484/analy/download?url=https://reflow.huoshan.com/hotsoon/s/OKIHYfwx700/
皮皮虾: http://123.206.19.217:8484/analy/download?url=https://h5.pipix.com/s/uwYSfq/
微视: http://123.206.19.217:8484/analy/download?url=https://h5.weishi.qq.com/weishi/feed/6Ytqpd2Qe1Idu3XXg/wsfeed?wxplay=1&id=6Ytqpd2Qe1Idu3XXg&spid=7657783424487211136&qua=v1_iph_weishi_6.0.2_126_app_a&chid=100081014&pkg=3670&attach=cp_reserves3_1000370011
最右: http://123.206.19.217:8484/analy/download?url=https://h5.izuiyou.com/detail/130327684?zy_to=applink&to=applink

观看无水印视频

抖音: http://123.206.19.217:8484/analy/watch?url=http://v.douyin.com/uWJyw2/
火山: http://123.206.19.217:8484/analy/watch?url=https://reflow.huoshan.com/hotsoon/s/OKIHYfwx700/
皮皮虾: http://123.206.19.217:8484/analy/watch?url=https://h5.pipix.com/s/uwYSfq/
微视: http://123.206.19.217:8484/analy/watch?url=https://h5.weishi.qq.com/weishi/feed/6Ytqpd2Qe1Idu3XXg/wsfeed?wxplay=1&id=6Ytqpd2Qe1Idu3XXg&spid=7657783424487211136&qua=v1_iph_weishi_6.0.2_126_app_a&chid=100081014&pkg=3670&attach=cp_reserves3_1000370011
最右: http://123.206.19.217:8484/analy/watch?url=https://h5.izuiyou.com/detail/130327684?zy_to=applink&to=applink

分享抖音获取原视频代码

public CommonResult getNoWatermarkUrl(String url) throws IOException {
        String html = Jsoup.connect(url).ignoreContentType(true).execute().body();
        Pattern pattern = Pattern.compile("(?<=playAddr: \")https?://.+(?=\",)");
        Matcher matcher = pattern.matcher(html);
        String noWatermarkUrl = "";
        while (matcher.find()) {
            // 获取原视频地址
            noWatermarkUrl = matcher.group(0).replaceAll("playwm", "play");
        }
        HttpURLConnection conn = (HttpURLConnection) new URL(noWatermarkUrl).openConnection();
        conn.setRequestProperty("Connection", "keep-alive");
        conn.setRequestProperty("Host", "aweme.snssdk.com");
        conn.setRequestProperty("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D57 Version/12.0 Safari/604.1");
        conn.setInstanceFollowRedirects(false);
        conn.setConnectTimeout(5000);
        // 获取重定向后视频原址
        noWatermarkUrl = conn.getHeaderField("Location");
        return CommonResult.successReturn(noWatermarkUrl, "原视频地址获取成功");
    }

作者微信:Liu19940528

你可能感兴趣的:(需求设计思路)