Zoom 网页字幕下载器

下载 Zoom 网页版会议实时字幕为 txt 文件

  1. // ==UserScript==
  2. // @name Zoom 网页字幕下载器
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description 下载 Zoom 网页版会议实时字幕为 txt 文件
  6. // @author YJ
  7. // @match https://*.zoom.us/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. // 创建下载按钮
  16. function createDownloadButton() {
  17. const btn = document.createElement('button');
  18. btn.innerText = '📥 下载字幕 (.txt)';
  19. btn.style.position = 'fixed';
  20. btn.style.top = '80px';
  21. btn.style.right = '20px';
  22. btn.style.zIndex = 9999;
  23. btn.style.padding = '10px 15px';
  24. btn.style.backgroundColor = '#0f62fe';
  25. btn.style.color = '#fff';
  26. btn.style.border = 'none';
  27. btn.style.borderRadius = '6px';
  28. btn.style.cursor = 'pointer';
  29. btn.style.fontSize = '14px';
  30. btn.onclick = downloadTranscript;
  31. document.body.appendChild(btn);
  32. }
  33.  
  34. // 提取并下载字幕
  35. function downloadTranscript() {
  36. const items = document.querySelectorAll('.lt-full-transcript__item');
  37. if (items.length === 0) {
  38. alert('未找到字幕内容,请确保字幕窗口已打开。');
  39. return;
  40. }
  41.  
  42. let transcript = '';
  43. items.forEach(item => {
  44. const time = item.querySelector('.lt-full-transcript__time')?.innerText?.trim() || '';
  45. const name = item.querySelector('.lt-full-transcript__display-name')?.innerText?.trim() || '';
  46. const message = item.querySelector('.lt-full-transcript__message')?.innerText?.trim() || '';
  47. transcript += `[${time}] ${name ? name + ': ' : ''}${message}\n`;
  48. });
  49.  
  50. const blob = new Blob([transcript], { type: 'text/plain;charset=utf-8' });
  51. const url = URL.createObjectURL(blob);
  52. const a = document.createElement('a');
  53. a.href = url;
  54. a.download = 'zoom_transcript.txt';
  55. a.click();
  56. URL.revokeObjectURL(url);
  57. }
  58.  
  59. // 等待页面加载字幕元素
  60. function waitForTranscript() {
  61. const checkInterval = setInterval(() => {
  62. const exists = document.querySelector('.lt-full-transcript__item');
  63. if (exists) {
  64. clearInterval(checkInterval);
  65. createDownloadButton();
  66. }
  67. }, 1000);
  68. }
  69.  
  70. waitForTranscript();
  71. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址