anyalerob commited on
Commit
79ec663
·
verified ·
1 Parent(s): 95a74bd

Upload 3 files

Browse files
Files changed (3) hide show
  1. index (4).html +183 -0
  2. script.js +14 -142
  3. style.css +1 -40
index (4).html ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>短视频无水印解析</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Kiwi+Maru:wght@300;400&display=swap" rel="stylesheet">
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
10
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
11
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
12
+ </head>
13
+ <body>
14
+ <div id="top-buttons">
15
+ <button id="theme-btn" class="top-btn"><i class="fas fa-moon"></i></button>
16
+ <button id="color-btn" class="top-btn"><i class="fas fa-palette"></i></button>
17
+ <button id="feedback-btn" class="top-btn"><i class="fas fa-comment"></i></button>
18
+ </div>
19
+
20
+ <div id="main-container">
21
+ <header id="header">
22
+ <h1><i class="fas fa-play-circle"></i> 短视频无水印解析</h1>
23
+ <div id="currentTime"></div>
24
+ <div id="weatherWidget"></div>
25
+ <div id="random-quote"></div>
26
+ </header>
27
+
28
+ <div id="platform-nav">
29
+ <div class="platform-btn" data-platform="抖音">
30
+ <img src="https://img.zlee.de/file/logo图片/1747377427291_dy.png" alt="抖音">
31
+ <span>抖音</span>
32
+ </div>
33
+ <div class="platform-btn" data-platform="快手">
34
+ <img src="https://img.zlee.de/file/logo图片/1747377484677_OIP-C.png" alt="快手">
35
+ <span>快手</span>
36
+ </div>
37
+ <div class="platform-btn" data-platform="火山视频">
38
+ <img src="https://img.zlee.de/file/logo图片/1747377480732_hssp.png" alt="火山视频">
39
+ <span>火山视频</span>
40
+ </div>
41
+ <div class="platform-btn" data-platform="西瓜视频">
42
+ <img src="https://img.zlee.de/file/logo图片/1747377479737_xgsp-black.png" alt="西瓜视频">
43
+ <span>西瓜视频</span>
44
+ </div>
45
+ <div class="platform-btn" data-platform="皮皮虾">
46
+ <img src="https://img.zlee.de/file/logo图片/1747377485180_ppx.png" alt="皮皮虾">
47
+ <span>皮皮虾</span>
48
+ </div>
49
+ <div class="platform-btn" data-platform="秒拍">
50
+ <img src="https://img.zlee.de/file/logo图片/1747377885467_mp (1).png" alt="秒拍">
51
+ <span>秒拍</span>
52
+ </div>
53
+ <div class="platform-btn" data-platform="头条视频">
54
+ <img src="https://img.zlee.de/file/logo图片/1747377883945_ttsp.png" alt="头条视频">
55
+ <span>头条视频</span>
56
+ </div>
57
+ <div class="platform-btn" data-platform="腾讯微视">
58
+ <img src="https://img.zlee.de/file/logo图片/1747377891436_腾讯微视.png" alt="腾讯微视">
59
+ <span>腾讯微视</span>
60
+ </div>
61
+ <div class="platform-btn" data-platform="美图秀秀">
62
+ <img src="https://img.zlee.de/file/logo图片/1747377886033_mtxx.png" alt="美图秀秀">
63
+ <span>美图秀秀</span>
64
+ </div>
65
+ <div class="platform-btn" data-platform="美拍">
66
+ <img src="https://img.zlee.de/file/logo图片/1747377887635_mp.png" alt="美拍">
67
+ <span>美拍</span>
68
+ </div>
69
+ <div class="platform-btn" data-platform="微博">
70
+ <img src="https://img.zlee.de/file/logo图片/1747377888691_wb.png" alt="微博">
71
+ <span>微博</span>
72
+ </div>
73
+ <div class="platform-btn" data-platform="小红书">
74
+ <img src="https://img.zlee.de/file/logo图片/1747377889452_xhs.png" alt="小红书">
75
+ <span>小红书</span>
76
+ </div>
77
+ <div class="platform-btn" data-platform="网易云">
78
+ <img src="https://img.zlee.de/file/logo图片/1747377894287_wyy.png" alt="网易云">
79
+ <span>网易云</span>
80
+ </div>
81
+ </div>
82
+
83
+ <div id="parser-container">
84
+ <div id="input-container">
85
+ <input type="text" id="urlInput" placeholder="请输入或粘贴视频链接...">
86
+ <button id="clipboard-btn" title="从剪贴板粘贴"><i class="fas fa-paste"></i></button>
87
+ </div>
88
+ <button id="parse-btn" class="btn parse-btn">解析</button>
89
+ <div id="debugInfo"></div>
90
+ </div>
91
+
92
+ <div id="contentBox"></div>
93
+
94
+ <div id="share-container" style="display: none;">
95
+ <button class="share-btn" onclick="copyLink()">复制链接</button>
96
+ <button class="share-btn" onclick="shareToWeChat()">分享到微信</button>
97
+ <button class="share-btn" onclick="shareToQQ()">分享到QQ</button>
98
+ </div>
99
+
100
+ <div id="tutorial-section">
101
+ <h2 class="section-title"><i class="fas fa-info-circle"></i> 使用教程</h2>
102
+ <div class="tutorial-item">
103
+ <div class="tutorial-step">步骤 1</div>
104
+ <p>打开目标短视频平台,复制分享链接。</p>
105
+ </div>
106
+ <div class="tutorial-item">
107
+ <div class="tutorial-step">步骤 2</div>
108
+ <p>粘贴链接到上方输入框,点击“解析”按钮。</p>
109
+ </div>
110
+ <div class="tutorial-item">
111
+ <div class="tutorial-step">步骤 3</div>
112
+ <p>等待解析完成,点击“保存视频”或“打包下载”。</p>
113
+ </div>
114
+ </div>
115
+
116
+ <div id="history-section">
117
+ <h2 class="section-title"><i class="fas fa-history"></i> 解析历史</h2>
118
+ <ul id="history-list"></ul>
119
+ </div>
120
+
121
+ <div id="faq-section">
122
+ <div class="section-title"><i class="fas fa-question-circle"></i> 常见问题</div>
123
+ <div class="faq-item">
124
+ <div class="faq-question"><i class="fas fa-question-circle"></i> Android手机上可以用吗?</div>
125
+ <div class="faq-answer">可以的,Android手机在常用的Chrome、UC、360、QQ等浏览器上都可以很方便的使用本站。</div>
126
+ </div>
127
+ <div class="faq-item">
128
+ <div class="faq-question"><i class="fas fa-question-circle"></i> iOS设备(iPhone、iPad、iPod)上点击下载视频按钮后,跳转到视频页面,并没有直接下载,怎么办?</div>
129
+ <div class="faq-answer">因Safari及微信内置浏览器均不支持下载文件,所以保存视频需要借助其他浏览器来完成,建议iOS用户在App Store下载免费的火狐浏览器,支持将下载的视频保存到手机相册。参考: <a href="https://example.com/firefox-tutorial" target="_blank">iPhone上利用《Firefox火狐浏览器》下载视频到手机相册的教程</a>。</div>
130
+ </div>
131
+ <div class="faq-item">
132
+ <div class="faq-question"><i class="fas fa-question-circle"></i> 我在电脑上用的是IE浏览器,点下载视频按钮后,出现跟上面那用iPad的哥们一样的情况,跳转到视频页面,如何下载到本地呢?</div>
133
+ <div class="faq-answer">电脑上少数浏览器不支持直接下载,但可以在下载视频按钮上点击右键,然后选择'目标另存为'或'链接存储为'来下载视频;或者到跳转后的视频页面,在视频画面上点击右键,然后选择'视频另存为'来下载视频。当然,我们更推荐在电脑上使用如谷歌Chrome浏览器、360浏览器极速模式、QQ浏览器极速模式等现代浏览器来获得最佳上网体验。</div>
134
+ </div>
135
+ <div class="faq-item">
136
+ <div class="faq-question"><i class="fas fa-question-circle"></i> 为什么解析成功了,还是有水印?</div>
137
+ <div class="faq-answer">本站可以解析99%以上的视频。但如果视频作者上传的视频本身就有水印,这种水印暂时无法去除。如何判断原视频是否有水印?请查看该视频在相应的APP里播放时是否有水印。</div>
138
+ </div>
139
+ <div class="faq-item">
140
+ <div class="faq-question"><i class="fas fa-question-circle"></i> 为什么会解析失败?</div>
141
+ <div class="faq-answer">视频被删除、被设置成私密、或在审核中都有可能导致解析失败。请确保您复制的是完整的分享链接,包含http或https前缀。您也可以通过“切换接口”按钮,重新尝试。如果仍然失败,可能是该平台暂不支持或接口临时故障,您可以反馈给我们。</div>
142
+ </div>
143
+ </div>
144
+
145
+ <footer>
146
+ <p>© 2024-2025 短视频解析 | <a href="javascript:void(0)" id="footer-feedback">意见反馈</a> | 在线访客: <span id="online-users">0</span></p>
147
+ <div class="copyright">
148
+ <p>该功能仅供个人娱乐学习,严禁商业用途。Ctrl + D (或 Command + D) 收藏我们,方便下次使用。</p>
149
+ <p>视频归相关网站及作者所有,本站不存储任何视频及图片。本站不对使用者的行为负担任何法律责任。</p>
150
+ <p>copyright@聚合短视频去水印</p>
151
+ </div>
152
+ </footer>
153
+ </div>
154
+
155
+ <div id="loading">
156
+ <div id="loading-spinner"></div>
157
+ <div>解析中,请稍候...</div>
158
+ <div id="progress-container">
159
+ <div id="progress-bar"></div>
160
+ </div>
161
+ <div id="progress-info"></div>
162
+ </div>
163
+
164
+ <div id="feedback-modal">
165
+ <div id="feedback-content">
166
+ <button id="close-modal">×</button>
167
+ <h2>反馈</h2>
168
+ <form id="feedback-form">
169
+ <textarea id="feedback-text" placeholder="请输入您的反馈..."></textarea>
170
+ <button type="submit" class="btn">提交</button>
171
+ <button type="button" id="cancel-feedback" class="btn">取消</button>
172
+ </form>
173
+ </div>
174
+ </div>
175
+
176
+ <div id="image-modal">
177
+ <img id="modal-image" alt="全尺寸图片">
178
+ <button id="close-modal">×</button>
179
+ </div>
180
+
181
+ <script src="script.js"></script>
182
+ </body>
183
+ </html>
script.js CHANGED
@@ -119,10 +119,22 @@ async function updateBackgroundImage() {
119
  } catch (error) {
120
  console.error('获取背景图片失败:', error);
121
  showDebugInfo('背景图片加载失败,将使用默认背景');
122
- document.body.style.backgroundImage = `url('https://img.zlee.de/file/1747479255036_【哲风壁纸】优香-少女-蔚蓝档案.png')`;
123
  }
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
  // URL提取
128
  function extractURL(text) {
@@ -228,7 +240,7 @@ async function parseContent(urlToParse) {
228
  toggleLoading(true);
229
 
230
  showDebugInfo(`正在解析中: ${url}`);
231
- const apiUrl = `https://api.kxzjoker.cn/api/jiexi_video_2?url=${encodeURIComponent(url)}`;
232
  const response = await fetch(apiUrl);
233
  showDebugInfo(`收到响应状态: ${response.status}`);
234
 
@@ -644,146 +656,6 @@ document.addEventListener('DOMContentLoaded', function() {
644
  console.warn('JSZip 未加载!打包下载功能不可用');
645
  showDebugInfo('警告:打包下载需要 JSZip 库支持');
646
  }
647
- unction extractDouyinVariant(text) {
648
- const re = /(https?:\/\/v\.douyin\.com\/[^\s]+)(?:\s+\d{2}\/\d{2})?/i;
649
- const m = text.match(re);
650
- if (!m) return null;
651
- return {
652
- displayUrl: m[0], // 完整变体,用于 UI 展示
653
- cleanUrl: m[1] // 纯短链,用于调用接口
654
- };
655
- }
656
-
657
- // —— 2. 修复粘贴按钮 ——
658
- document.getElementById('clipboard-btn').addEventListener('click', async () => {
659
- const videoUrlInput = document.getElementById('urlInput');
660
- try {
661
- const text = await navigator.clipboard.readText();
662
- if (!text) throw new Error('剪贴板为空');
663
- videoUrlInput.value = text;
664
- const variant = extractDouyinVariant(text);
665
- if (variant) {
666
- showDebugInfo(`已提取:${variant.displayUrl}`);
667
- parseContent(variant.cleanUrl);
668
- } else {
669
- showAlert('未检测到有效的短链,请检查复制的内容');
670
- }
671
- } catch (err) {
672
- console.warn('读取剪贴板失败', err);
673
- showAlert('无法访问剪贴板,请手动粘贴链接');
674
- videoUrlInput.focus();
675
- }
676
- });
677
-
678
- // —— 3. “解析”按钮 & 回车 同样使用新提取 ——
679
- document.getElementById('parse-btn').addEventListener('click', () => {
680
- const raw = document.getElementById('urlInput').value.trim();
681
- const variant = extractDouyinVariant(raw);
682
- if (variant) {
683
- showDebugInfo(`调用接口:${variant.cleanUrl}`);
684
- parseContent(variant.cleanUrl);
685
- } else {
686
- showAlert('请输入或粘贴有效的抖音短链');
687
- }
688
- });
689
- document.getElementById('urlInput').addEventListener('keypress', e => {
690
- if (e.key === 'Enter') {
691
- const raw = e.target.value.trim();
692
- const variant = extractDouyinVariant(raw);
693
- if (variant) parseContent(variant.cleanUrl);
694
- else showAlert('请输入或粘贴有效的抖音短链');
695
- }
696
- });
697
-
698
- // —— 4. 修改 parseContent 接口调用,直接用 cleanUrl ——
699
- async function parseContent(cleanUrl) {
700
- if (isParsing) return;
701
- isParsing = true;
702
- toggleLoading(true);
703
- try {
704
- showDebugInfo(`开始解析:${cleanUrl}`);
705
- const apiUrl = `https://api.kxzjoker.cn/api/jiexi_video?url=${encodeURIComponent(cleanUrl)}`;
706
- const resp = await fetch(apiUrl);
707
- const data = await resp.json();
708
- if (!data.success) throw new Error(data.message || '解析失败');
709
- renderContent(data.data);
710
- saveToHistory({ url: cleanUrl, title: data.data.video_title, cover: data.data.image_url });
711
- document.getElementById('share-container').style.display = 'flex';
712
- } catch (err) {
713
- showDebugInfo(`错误:${err.message}`);
714
- showAlert(`❌ 解析失败:${err.message}`);
715
- } finally {
716
- toggleLoading(false);
717
- isParsing = false;
718
- }
719
- }
720
-
721
- // —— 5. 图集预览:闭包变量 & 批量绑定 ——
722
- let galleryImages = [];
723
- let currentIndex = 0;
724
-
725
- function updateModalImage() {
726
- document.getElementById('modal-image').src = galleryImages[currentIndex];
727
- }
728
-
729
- document.getElementById('image-close').addEventListener('click', () => {
730
- document.getElementById('image-modal').style.display = 'none';
731
- });
732
- document.getElementById('image-prev').addEventListener('click', () => {
733
- if (currentIndex > 0) {
734
- currentIndex--;
735
- updateModalImage();
736
- }
737
- });
738
- document.getElementById('image-next').addEventListener('click', () => {
739
- if (currentIndex < galleryImages.length - 1) {
740
- currentIndex++;
741
- updateModalImage();
742
- }
743
- });
744
-
745
- // —— 6. renderContent 中图集渲染改造示例 ——
746
- function renderContent(data) {
747
- const contentBox = document.getElementById('contentBox');
748
- contentBox.innerHTML = '';
749
-
750
- if (data.images) {
751
- // 把 images 赋给闭包
752
- galleryImages = data.images;
753
-
754
- // 生成只带 data-index 的缩略图
755
- const galleryHTML = data.images.map((img, idx) => `
756
- <div class="gallery-item" data-index="${idx}">
757
- < img src="${img}" alt="图集 ${idx + 1}"
758
- loading="lazy"
759
- style="width:100%;aspect-ratio:1/1;object-fit:cover;cursor:pointer;">
760
- <div class="image-index">${idx+1}</div>
761
- </div>
762
- `).join('');
763
-
764
- contentBox.innerHTML = `
765
- <div class="media-card">
766
- <h2 style="color: var(--primary-color);"><i class="fas fa-images"></i>${data.title||'未命名图集'}</h2>
767
- <div id="gallery-grid" style="display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));">
768
- ${galleryHTML}
769
- </div>
770
- <div style="text-align:center;margin-top:15px;">
771
- <i class="fas fa-file-archive"></i> 打包下载
772
- </div>
773
- </div>
774
- `;
775
- contentBox.style.display = 'block';
776
- contentBox.scrollIntoView({ behavior: 'smooth' });
777
-
778
- // 批量绑定点击事件
779
- document.querySelectorAll('#gallery-grid .gallery-item').forEach(el => {
780
- el.addEventListener('click', () => {
781
- currentIndex = parseInt(el.getAttribute('data-index'), 10);
782
- updateModalImage();
783
- document.getElementById('image-modal').style.display = 'flex';
784
- });
785
- });
786
-
787
 
788
  setInterval(updateTime, 1000);
789
  updateTime();
 
119
  } catch (error) {
120
  console.error('获取背景图片失败:', error);
121
  showDebugInfo('背景图片加载失败,将使用默认背景');
122
+ document.body.style.backgroundImage = `url('https://via.placeholder.com/1920x1080?text=Default+Background')`;
123
  }
124
  }
125
 
126
+ // 获取在线访客人数(假设 API)
127
+ async function updateOnlineUsers() {
128
+ try {
129
+ const response = await fetch('https://api.example.com/online-users');
130
+ const data = await response.json();
131
+ const onlineUsers = data.count || 0;
132
+ document.getElementById('online-users').textContent = onlineUsers;
133
+ } catch (error) {
134
+ console.error('获取在线人数失败:', error);
135
+ document.getElementById('online-users').textContent = '未知';
136
+ }
137
+ }
138
 
139
  // URL提取
140
  function extractURL(text) {
 
240
  toggleLoading(true);
241
 
242
  showDebugInfo(`正在解析中: ${url}`);
243
+ const apiUrl = `https://api.kxzjoker.cn/api/jiexi_video?url=${encodeURIComponent(url)}`;
244
  const response = await fetch(apiUrl);
245
  showDebugInfo(`收到响应状态: ${response.status}`);
246
 
 
656
  console.warn('JSZip 未加载!打包下载功能不可用');
657
  showDebugInfo('警告:打包下载需要 JSZip 库支持');
658
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
659
 
660
  setInterval(updateTime, 1000);
661
  updateTime();
style.css CHANGED
@@ -575,43 +575,4 @@ footer a:hover {
575
  position: fixed;
576
  pointer-events: none;
577
  z-index: 5;
578
- }
579
- /* —— 图集预览模态框 —— */
580
- #image-modal {
581
- display: none;
582
- position: fixed;
583
- top: 0; left: 0;
584
- width: 100%; height: 100%;
585
- background: rgba(0,0,0,0.8);
586
- z-index: 2000;
587
- display: flex;
588
- align-items: center;
589
- justify-content: center;
590
- }
591
- #image-modal img {
592
- max-width: 90%;
593
- max-height: 90%;
594
- border-radius: 8px;
595
- }
596
- .modal-close {
597
- position: absolute;
598
- top: 1rem; right: 1rem;
599
- background: none; border: none;
600
- font-size: 2rem;
601
- color: var(--primary-color);
602
- cursor: pointer;
603
- }
604
- .modal-nav {
605
- position: absolute;
606
- top: 50%;
607
- transform: translateY(-50%);
608
- background: rgba(0,0,0,0.3);
609
- border: none;
610
- font-size: 3rem;
611
- color: white;
612
- width: 2rem; height: 3rem;
613
- cursor: pointer;
614
- border-radius: 0.3rem;
615
- }
616
- #image-prev { left: 1rem; }
617
- #image-next { right: 1rem; }
 
575
  position: fixed;
576
  pointer-events: none;
577
  z-index: 5;
578
+ }