feat: 修复xml格式问题

This commit is contained in:
Yuanzhe Liu
2023-09-10 15:46:55 +00:00
parent 51531408fb
commit 9348b62de5
3 changed files with 10 additions and 14 deletions

View File

@@ -18,12 +18,10 @@ function Iqiyi() {
this.resolve = async (url) => {
const res = await axios({
url: url,
method: "get",
url: "https://proxy-fc-python-fdssfsqzaa.cn-shenzhen.fcapp.run/",
params: { url },
auth: {
username: "proxy",
password: "proxy"
headers: {
"Accept-Encoding": "gzip,deflate,compress"
}
});
const data = res.data;

View File

@@ -1,11 +1,11 @@
const content_template = {
timepoint: 0,
timepoint: 0, // 弹幕发送时间(秒)
ct: 1, // 弹幕类型1-3 为滚动弹幕、4 为底部、5 为顶端、6 为逆向、7 为精确、8 为高级
size: 25, //字体大小25 为中18 为小
color: 16777215, //弹幕颜色RGB 颜色转为十进制后的值16777215 为白色
unixtime: Math.floor(Date.now() / 1000), //Unix 时间戳格式
uid: 0, //发送人的 id
content: "",
ct: 1,
size: 20,
color: 16777215,
unixtime: Math.floor(Date.now() / 1000),
uid: 0,
};
function time_to_second(time) {

View File

@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<i>
<% for (const content of contents) { %>
<d p="<%= content.timepoint %>,<%= content.ct %>,<%= content.size %>,<%= content.color %>,<%= content.unixtime %>,<%= content.uid %>,26732601000067074">
<%=content.content%>
</d>
<d p="<%= content.timepoint %>,<%= content.ct %>,<%= content.size %>,<%= content.color %>,<%= content.unixtime %>,0,<%= content.uid %>,26732601000067074,1"><%=content.content%></d>
<% } %>
</i>