新增B站视频下载功能

新增弹幕转ass功能
优化B站网络请求头代码
This commit is contained in:
2022-05-04 22:30:56 +08:00
parent edfd663743
commit 84c583ad38
9 changed files with 58812 additions and 27 deletions

View File

@@ -68,10 +68,10 @@ public class AppTools {
}
if (isInput) {
processOut(process.getInputStream(), objectInterface, isOutQQBot);
processOut(process.getErrorStream());
processOut(process.getErrorStream(),null,isOutQQBot);
} else {
processOut(process.getErrorStream(), objectInterface, isOutQQBot);
processOut(process.getInputStream());
processOut(process.getInputStream(),null,isOutQQBot);
}
process.destroy();
} catch (Exception e) {

View File

@@ -1,7 +1,21 @@
package com.yutou.qqbot.utlis;
import java.io.File;
public class StringUtils {
public static boolean isEmpty(String str){
return str == null || str.trim().length() == 0;
}
public static String toSaveFileName(String str){
return str.replace("\\","_")
.replace("/","_")
.replace(":","_")
.replace("*","_")
.replace("?","_")
.replace("\"","_")
.replace("<","_")
.replace(">","_")
.replace("|","_")
.replace("$(File.separator)", File.separator);
}
}