|
@@ -423,10 +423,7 @@ public class HttpUtils {
|
|
String photoId = path.substring(path.lastIndexOf("/")+1,path.length());
|
|
String photoId = path.substring(path.lastIndexOf("/")+1,path.length());
|
|
path =path.substring(0,path.lastIndexOf("/"));
|
|
path =path.substring(0,path.lastIndexOf("/"));
|
|
String uid = path.substring(path.lastIndexOf("/")+1,path.length());
|
|
String uid = path.substring(path.lastIndexOf("/")+1,path.length());
|
|
- System.out.println(uid);
|
|
|
|
- System.out.println(photoId);
|
|
|
|
res = HttpUtils.postKuaishouVideoUrl("https://live.kuaishou.com/m_graphql",uid,photoId);
|
|
res = HttpUtils.postKuaishouVideoUrl("https://live.kuaishou.com/m_graphql",uid,photoId);
|
|
- System.out.println(res);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public static String postKuaishouVideoUrl(String url,String uid,String photoId){
|
|
public static String postKuaishouVideoUrl(String url,String uid,String photoId){
|
|
@@ -472,10 +469,8 @@ public class HttpUtils {
|
|
httpGet.setHeader("Accept-Language", "zh-CN,zh;q=0.9");
|
|
httpGet.setHeader("Accept-Language", "zh-CN,zh;q=0.9");
|
|
response = httpClient.execute(httpGet);
|
|
response = httpClient.execute(httpGet);
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
- System.out.println(statusCode);
|
|
|
|
if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
|
|
if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
|
|
String newUrl = response.getFirstHeader("Location").getValue();
|
|
String newUrl = response.getFirstHeader("Location").getValue();
|
|
- System.out.println(newUrl);
|
|
|
|
return newUrl;
|
|
return newUrl;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -494,10 +489,8 @@ public class HttpUtils {
|
|
httpGet.setHeader("User-Agent", USER_AGENT);
|
|
httpGet.setHeader("User-Agent", USER_AGENT);
|
|
response = httpClient.execute(httpGet);
|
|
response = httpClient.execute(httpGet);
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
- System.out.println(statusCode);
|
|
|
|
if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
|
|
if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
|
|
String newUrl = response.getFirstHeader("Location").getValue();
|
|
String newUrl = response.getFirstHeader("Location").getValue();
|
|
- System.out.println(newUrl);
|
|
|
|
return httpGetRequest(newUrl);
|
|
return httpGetRequest(newUrl);
|
|
} else if (statusCode == HttpStatus.SC_OK) {
|
|
} else if (statusCode == HttpStatus.SC_OK) {
|
|
BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
|
|
BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
|
|
@@ -913,7 +906,6 @@ public class HttpUtils {
|
|
}
|
|
}
|
|
|
|
|
|
public static JSONObject feishuGetRequest(String accessToken, String url, JSONObject params) {
|
|
public static JSONObject feishuGetRequest(String accessToken, String url, JSONObject params) {
|
|
- System.out.println(url);
|
|
|
|
// 构造请求
|
|
// 构造请求
|
|
HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
|
|
HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
|
|
@Override
|
|
@Override
|