Skip to content

Instantly share code, notes, and snippets.

@geminixiang
Created October 10, 2025 18:58
Show Gist options
  • Select an option

  • Save geminixiang/0747e3115e57df3a5ea4d8faf1e3d774 to your computer and use it in GitHub Desktop.

Select an option

Save geminixiang/0747e3115e57df3a5ea4d8faf1e3d774 to your computer and use it in GitHub Desktop.
繞過 cloudflare 檢查下載影片
// 找到 video 元素
const video = document.querySelector('video');
// 取得影片 URL
const videoSrc = video.src || video.currentSrc;
console.log('影片 URL:', videoSrc);
// 建立下載
fetch(videoSrc)
.then(response => response.blob())
.then(blob => {
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'video.mp4';
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(a);
})
.catch(err => console.error('下載失敗:', err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment