您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Generates a yt-dlp command to download audio from Bilibili video pages
// ==UserScript== // @name Bilibili Audio Download Command Generator // @namespace http://tampermonkey.net/ // @version 1.2 // @description Generates a yt-dlp command to download audio from Bilibili video pages // @author Ethan // @match https://www.bilibili.com/video/* // @grant none // @license GPL-3.0 // @icon https://bilibili.com/favicon.ico // ==/UserScript== /* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ (function() { 'use strict'; // Create a button let btn = document.createElement('button'); btn.innerText = 'Copy Download Command'; btn.style.position = 'fixed'; btn.style.top = '100px'; btn.style.right = '20px'; btn.style.zIndex = 9999; btn.style.padding = '10px'; btn.style.background = '#ff4b00'; btn.style.color = '#fff'; btn.style.border = 'none'; btn.style.borderRadius = '5px'; btn.style.cursor = 'pointer'; document.body.appendChild(btn); // Copy yt-dlp command when clicked btn.addEventListener('click', () => { let url = window.location.href; if(!url.includes("bilibili.com/video")) { alert("Please open a Bilibili video page"); return; } let command = `yt-dlp -f ba "${url}"`; navigator.clipboard.writeText(command) .then(()=>alert("Command copied to clipboard! Execute in terminal to download audio.(before run command you need install python+run command python3 -m pip install -U yt-dlp)")) .catch(()=>alert("Copy failed, please copy the command manually.")); }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址