国内各大短视频平台去水印下载内容,新年限时免费使用。
示例程序(请使用微信扫码使用)
接口文档V1.0
文档变更记录
| 版本编号 | 版本日期 | 作者 | 说明 |
|---|---|---|---|
| 1.0 | 2021/01/31 | shaofeer | 去水印接口 |
接口列表
| 接口 | 说明 |
|---|---|
| /api/shaofeer/video/watermark | 去水印接口 |
错误码列表
| 错误码 | 说明 |
|---|---|
| 200 | 正确 |
| 500 | 错误 |
| 4001 | 参数异常 |
| 4002 | 次数异常 |
接口详情
-
去水印接口
-
接口地址:/api/shaofeer/video/watermark
-
返回格式:Json
-
请求方式:Post
-
ContentType: application/json
-
接口备注:通过短视频的URL进行请求获取高清无水印视频。
-
请求参数说明:
名称 类型 必填 说明 示例 requestId string true 请求ID,全局唯一 5766c1a9-36f0-4bcc-9399-ebfe45a5da80 timestamp Long true 时间戳,格式(yyyyMMddHHmmss) 20200232230126 shareUrl string true 短视频分享的URL pipixia.com uid string true 用户ID test token string true 用户TOKEN=MD5Util.MD5(uid + userKey + appKey, timestamp) 394540E1EB7AC05884789A93FE1D107D
uid、userKey、appKey 请关注微信公众号
趣学程序索取。-
返回参数说明:
名称 类型 说明 示例 success boolean 是否成功 true message string 描述信息 错误码:4001 code int 状态码 500 timestamp long 时间戳 1512105536097 result object 具体对象 -
-
result 参数说明:
名称 类型 说明 示例 requestId string 请求ID 错误码:4001 shareUrl string 分享的URL 500 timestamp long 时间戳 1512105536097 playUrl string 最终的无水印URL - token string token - uid string 用户ID -
- JSON返回示例:
-
{
"success":true,
"message":"success",
"code":200,
"timestamp":1612105804053,
"result":{
"requestId":"065aff0f-0b55-4a2f-8198-6af0e1d75dba",
"timestamp":"20210131231003",
"shareUrl":"http://pipixia.com",
"playUrl":"http://v3-ppx.ixigua.com/a76290e42516fc1a96bbb37bda73f065/5ffc677b/video/tos/cn/tos-cn-ve-0076/612ff26bd8354e5abb54ac5b64b8bf87/?a=1319&br=1485&bt=495&cd=0%7C0%7C0&cr=0&cs=0&cv=1&dr=6&ds=6&er=&l=202101112151040101981130493D0984FF&lr=&mime_type=video_mp4&qs=0&rc=ank4b3RrdW1yeTMzZmYzM0ApZ2Y4NWc4OTxpN2Q7OTo4ZWdjMWBua3FqLnBfLS0zMTBzc2MtNjZeYDI2MTU2MjUtYy06Yw%3D%3D&vl=&vr=",
"token":"0CB936B2Q7OTo4ZWdjMWBua3Fq6",
"uid":"1222"
}
}
附录I:
MD5Utils:
import java.security.MessageDigest;
public class MD5Util {
public final static String MD5(String pwd) {
if (pwd == null) {
return "";
}
return MD5(pwd.getBytes());
}
public final static String MD5(String pwd, String salt) {
if (pwd == null) {
return "";
}
pwd += salt + MD5Util.class.getSimpleName();
return MD5(pwd.getBytes());
}
public final static String MD5(byte[] btInput) {
char md5String[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
try {
MessageDigest mdInst = MessageDigest.getInstance("MD5");
mdInst.update(btInput);
byte[] md = mdInst.digest();
int j = md.length;
char str[] = new char[j * 2];
int k = 0;
for (int i = 0; i < j; i++) {
byte byte0 = md[i];
str[k++] = md5String[byte0 >>> 4 & 0xf];
str[k++] = md5String[byte0 & 0xf];
}
return new String(str);
} catch (Exception e) {
return null;
}
}
/**
* 一个byte转为2个hex字符
*
* @param src byte数组
* @return 16进制大写字符串
*/
private static String bytes2Hex(byte[] src) {
char[] res = new char[src.length << 1];
final char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
for (int i = 0, j = 0; i < src.length; i++) {
res[j++] = hexDigits[src[i] >>> 4 & 0x0F];
res[j++] = hexDigits[src[i] & 0x0F];
}
return new String(res);
}
}