mirror of
https://github.com/lyz05/danmaku.git
synced 2026-02-02 17:59:53 +08:00
feat: 修复xml格式问题
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user