mirror of
https://github.com/lyz05/danmaku.git
synced 2026-02-03 02:04:38 +08:00
130 lines
5.7 KiB
Plaintext
130 lines
5.7 KiB
Plaintext
<% var title="主流视频网站弹幕解析接口"%>
|
||
<%- include('utils/header', {title}); %>
|
||
|
||
<body>
|
||
<div class="container">
|
||
<div class="row text-center">
|
||
<div class="page-header">
|
||
<h1>
|
||
主流视频网站弹幕文件解析接口
|
||
</h1>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-sm-8">
|
||
<p>
|
||
这是一个弹幕文件解析接口!输入你要解析的视频地址,即可获得B站弹幕形式的XML文件。<br/>
|
||
通过使用<a href="https:///www.dandanplay.com/" target="_blank" rel="noopener noreferrer">弹弹Play播放器</a>
|
||
或者<a href='https://tiansh.github.io/us-danmaku/bilibili/' target="_blank" rel="noopener noreferrer">bilibili ASS 弹幕在线转换项目</a>
|
||
转换为普通字幕文件,即可在本地播放器中播放。
|
||
</p>
|
||
<p>
|
||
使用方法:在当前页面添加一个查询字符串url<br/>
|
||
目前支持
|
||
<% names.forEach(function(name, idx) { %>
|
||
<a href="https://<%= domains[idx] %>" target="_blank" rel="noopener noreferrer"><%= name %></a><% if (idx !== names.length - 1) { %>,<% } %>
|
||
<% }); %>。
|
||
<br/>
|
||
注意:目前只支持单个视频的解析,不支持专辑的解析。<br/>
|
||
赞助一下服务器费用吧!<a href="https://blog.lyz05.cn/about/#%E6%89%93%E8%B5%8F">打赏链接</a><br/>
|
||
遇到什么问题,或有任何意见可以在<a href="https://github.com/lyz05/danmaku/issues">Issue</a>中提出<br/>
|
||
<strong>温馨提示:点击提交按钮,耐心等待就好,切勿疯狂刷新。在线爬取平均需要5s左右的时间</strong><br/>
|
||
</p>
|
||
<p>
|
||
<!-- 会对弹幕文本进行去重,去除包含xml标签的非法弹幕文本 -->
|
||
例子:<br/>
|
||
<% urls.forEach(function(url) { %>
|
||
<%= path %>?url=<%= url %><br/>
|
||
<% }); %>
|
||
</p>
|
||
</div>
|
||
<div class="col-sm-4">
|
||
<h4>最近一天下载热榜</h4>
|
||
<ul id="hotlist">
|
||
<!-- 异步加载 hotlist -->
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<p>在下方直接输入视频网址,点击提交按钮也可解析。</p>
|
||
<form class="form-horizontal">
|
||
<div class="form-group">
|
||
<label class="col-sm-1 control-label">视频网址</label>
|
||
<div class="col-sm-5">
|
||
<!--suppress HtmlFormInputWithoutLabel -->
|
||
<input type="text" class="form-control" placeholder="URL" name="url">
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<div class="col-sm-offset-1 col-sm-5">
|
||
<div class="checkbox">
|
||
<label>
|
||
<input type="checkbox" name="download" checked='checked'> 强制下载
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<div class="col-sm-offset-1 col-sm-5 btn-group" role="group" aria-label="提交与清空">
|
||
<button type="submit" class="btn btn-primary">提交</button>
|
||
<button type="reset" class="btn btn-default">清空</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
</div>
|
||
<hr/>
|
||
<footer class="footer">
|
||
<div class="row">
|
||
Powered by <a href="https://fly.io/"><strong>Fly.io</strong> </a>
|
||
<span class="post-meta-divider">|</span>
|
||
Reference blog:
|
||
<!-- <a href="https://lxmymjr.github.io/contents/%E4%B8%BB%E6%B5%81%E8%A7%86%E9%A2%91%E7%BD%91%E7%AB%99%E5%BC%B9%E5%B9%95%E4%B8%8B%E8%BD%BD">主流视频网站弹幕下载</a>-->
|
||
<a href="https://blog.lyz05.cn/2020/%E5%9F%BA%E4%BA%8E%E9%98%BF%E9%87%8C%E4%BA%91%E5%87%BD%E6%95%B0%E5%AE%9E%E7%8E%B0%E5%BC%B9%E5%B9%95%E6%96%87%E4%BB%B6%E8%A7%A3%E6%9E%90%E6%8E%A5%E5%8F%A3">
|
||
<strong>主流视频网站弹幕下载</strong>
|
||
</a>
|
||
<span class="post-meta-divider">|</span>
|
||
Source Code:
|
||
<a href="https://github.com/lyz05/danmaku"><strong>开源代码</strong></a>
|
||
|
||
</div>
|
||
|
||
<div class="row">
|
||
今日解析量:<span id="today_visited">加载中...</span><span class="post-meta-divider"> | </span>
|
||
昨日解析量:<span id="lastday_visited">加载中...</span><span class="post-meta-divider"> | </span>
|
||
近一个月解析量:<span id="month_visited">加载中...</span>
|
||
</div>
|
||
|
||
</footer>
|
||
</div>
|
||
|
||
</body>
|
||
<script>
|
||
$(document).ready(function() {
|
||
$.ajax({
|
||
url: "/api/home-data",
|
||
method: "GET",
|
||
dataType: "json",
|
||
success: function(data) {
|
||
// 更新热榜
|
||
var hotlistEl = $("#hotlist");
|
||
hotlistEl.empty();
|
||
data.hotlist.forEach(function(item) {
|
||
hotlistEl.append(
|
||
`<li><a href="${item.url}">${item.title}</a> - ${item.count} 次访问</li>`
|
||
);
|
||
});
|
||
|
||
// 更新访问统计
|
||
$("#today_visited").text(data.resolve_info.today_visited);
|
||
$("#lastday_visited").text(data.resolve_info.lastday_visited);
|
||
$("#month_visited").text(data.resolve_info.month_visited);
|
||
},
|
||
error: function(xhr, status, err) {
|
||
console.error("加载首页数据失败", err);
|
||
$("#hotlist").html("<li>加载失败</li>");
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
</html> |