Files
2026-04-23 02:44:00 +08:00

27 lines
994 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function() {
// 優先尋找 hd 版本,如果沒有則取第一個
let source = fs.video.media.src.find(s => s.src.includes('video_hd.mp4')) || fs.video.media.src[0];
const videoSrc = source.src;
const referer = location.href;
const cookie = document.cookie;
const userAgent = navigator.userAgent;
const fileName = (document.title.split('|')[0].trim() || 'video').replace(/[\\/:*?"<>|]/g, '_') + '.mp4';
const output = `
# === 從 GetEnv.js 複製的內容開始 ===
url = "${videoSrc}"
headers = {
"Referer": "${referer}",
"User-Agent": "${userAgent}",
"Cookie": "${cookie}"
}
filename = "${fileName}"
# === 從 GetEnv.js 複製的內容結束 ===
`.trim();
console.log("%c已產生 Python 配置資訊:", "color: #28a745; font-weight: bold; font-size: 1.2em;");
console.log(output);
console.log("%c請直接複製上方內容覆蓋 download.py 的配置區域。", "color: #007bff;");
})();