Greasy Fork is available in English.
下载USTC网课回放
当前为
// ==UserScript==
// @name ustc网课下载
// @namespace https://www.bb.ustc.edu.cn/
// @version 0.1
// @description 下载USTC网课回放
// @author 398
// @match *://www.eeo.cn/*
// @grant none
// @run-at document-end
// ==/UserScript==
function exec(fn) {
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = '(' + fn + ')();';
document.body.appendChild(script);
document.body.removeChild(script);
}
exec(function() {
console.log("做视频网的MP4视频提取");
var getpathTimer = null;
getpathTimer = setTimeout(() => {
var mp4_path = null;
mp4_path = $("video[src$='.mp4']").attr('src');
var path_scr = document.createElement('a');
path_scr.setAttribute('href', mp4_path);
path_scr.textContent = '下载链接';
document.getElementById('lesson-time').appendChild(path_scr)
console.log("mp4_path",mp4_path);
},800);
});