赞
踩
许多小伙伴想做抖音视频,无奈没有摄影器材,也没有取景材料,就想着去用别人人气视频来提高自己的粉丝量。可问题又来了,别人的视频通过分享,或者链接根本不是原创,上面还带着水印。视频一挂上去就被发现了,小则视频不通过,给出警告,大则封号,降低视频流量。
别着急,我在这里贴出两份代码,只需要你把分享链接拷贝过来,就能将想要的视频无水印的保存到本地。
package demo;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
import java.io.*;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.util.Collections;
import java.util.Date;
import java.util.Map;
public class DY02 {
public static void main(String[] args) {
//输入分享链接
String url1 = “#在抖音,记录美好生活#在最好的年纪,做最疯狂的事 http://v.douyin.com/xB7gDq/ 复制此链接,打开【抖音短视频】,直接观看视频!”;
String s = parserUrl(url1); //获取到无水印下载地址 //System.out.println(doGet(s)); } public static String parserUrl(String url) { BufferedReader in = null; String playUrl = null; String brgUrl = null; Map<String, String> result = Collections.EMPTY_MAP; try { URL realUrl = new URL(url); URLConnection connection = realUrl.openConnection(); connection.setRequestProperty("accept", "*/*"); connection.setRequestProperty("connection",
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。