您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
爬取课件url
当前为
// ==UserScript== // @name 小雅爬爬爬 // @match *://ccnu.ai-augmented.com/* // @grant none // @description 爬取课件url // @license MIT // @author Yi // @version 1.0.0 // @namespace https://gf.qytechs.cn/users/1268039 // ==/UserScript== // 定义要抓取的后缀名 var extensions = [".doc", ".pdf", ".docx", ".ppt", ".pptx", ".xls", ".xlsx"]; // 创建一个元素,用于显示抓取到的 url var list = document.createElement("div"); list.style.position = "fixed"; list.style.top = "10px"; list.style.right = "0"; list.style.width = "300px"; list.style.height = "10%"; list.style.overflow = "auto"; list.style.backgroundColor = "yellow"; list.style.zIndex = "9999"; list.style.padding = "10px"; list.style.border = "1px solid black"; list.innerHTML = "<h3>抓取到的 url</h3>"; document.body.appendChild(list); // 监听 xhr 请求,检查响应的 url 是否符合条件 var open = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(method, url, async, user, pass) { this.addEventListener("load", function() { // 如果 url 包含指定的后缀名之一,将其添加到列表中 for (var i = 0; i < extensions.length; i++) { if (url.includes(extensions[i])) { var link = document.createElement("a"); link.href = url; link.target = "_blank"; link.textContent = url; list.appendChild(link); list.appendChild(document.createElement("br")); break; } } }); open.call(this, method, url, async, user, pass); };
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址