# 59iedu华博教育系列刷课脚本 **Repository Path**: tuziang/59iedu ## Basic Information - **Project Name**: 59iedu华博教育系列刷课脚本 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-18 - **Last Updated**: 2025-09-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 59iedu华博教育系列刷课脚本 ### 脚本介绍 该油猴脚本用于 59iedu华博教育系列 的辅助看课,使用JavaScript编写,适配网址:https://*.59iedu.com/ **脚本功能如下:** 1.自动检测进度并点击课程学习按钮 2.自动过计算题验证 **脚本安装地址:** [https://scriptcat.org/zh-CN/script-show-page/4233](https://scriptcat.org/zh-CN/script-show-page/4233) 如果不会安装脚本,请按照下面安装教程来操作。 ### 代学服务 **如需代学,请联系客服,支持闲鱼交易。** - 微信联系:yizhituziang ![https://jiaobenmiao.com/img/weixin.jpg](https://jiaobenmiao.com/img/weixin.jpg) - QQ联系:2422270452 ![https://jiaobenmiao.com/img/qq.jpg](https://jiaobenmiao.com/img/qq.jpg) ### 安装教程 #### 1.安装浏览器扩展插件 首先需要给我们的浏览器安装上脚本猫插件,这是运行所有用户脚本的基础,如果浏览器已经安装过了脚本猫或者油猴插件,那么可以跳过这一步。推荐使用edge浏览器,安装插件更方便。 浏览器打开网址:[https://docs.scriptcat.org/](https://docs.scriptcat.org/) 这里用edge浏览器作为示范,点击 **“添加到Edge浏览器”** ![image-20250916183549234](https://jiaobenmiao.com/articleimg/image-20250916183549234.png) 接着点击 **“获取”** ![image-20250916183818025](https://jiaobenmiao.com/articleimg/image-20250916183818025.png) 在右上角弹出的窗口,点击 **“添加扩展”** ![image-20250916183841569](https://jiaobenmiao.com/articleimg/image-20250916183841569.png) 等待几秒钟,会提示已经安装好脚本猫插件了。 ![image-20250916183906107](https://jiaobenmiao.com/articleimg/image-20250916183906107.png) #### 2.安装刷课脚本 打开脚本安装地址后,在页面点击 **“安装脚本”** 按钮,接着在弹出的窗口点击 **“安装”** ,之后就会提示“安装成功”。 #### 3.体验脚本功能 安装脚本后,需要重新进入学习站点,如果之前已经打开课程学习页面,那么需要刷新页面后脚本才会生效。 ### 核心代码 ```js function jisuan(x, y, z) { var s; x = Number(x); z = Number(z); if (y == "+") { s = x + z; } else if (y == "-") { s = x - z; } else if (y == "x") { s = x * z; } else if (y == "÷") { s = s / z; } return s; } //判断验证码页面是否出现 var zt = document.querySelector('.vjs-play-control > span:nth-child(2)')?.textContent; var question = document.querySelector(".d-qus-body"); if (zt == "播放" && question == null) { document.querySelector('.vjs-play-control').click() } if (question != null) { console.log("验证页面出现了"); // 提取题目输出:例"2 x 5 = ?" let qu = document.querySelector(".d-qus-body").innerText; //提取题目并进行计算 //let qu = "2 x 5 = ?" console.log('获取题目:', qu); console.log(qu[0], qu[2], qu[4]); let a = jisuan(qu[0], qu[2], qu[4]); console.log("计算结果:", a); // 提取A选项答案 let ansA = document.querySelector('div.d-slt:nth-child(1) > label:nth-child(1) > span:nth-child(4)')?.innerText; // A选项是否被选中 let chA = document.querySelector('div.d-slt:nth-child(1) > label:nth-child(1) > input:nth-child(1)'); // 提取B选项答案 let ansB = document.querySelector('div.d-slt:nth-child(2) > label:nth-child(1) > span:nth-child(4)')?.innerText; // B选项是否被选中 let chB = document.querySelector('div.d-slt:nth-child(2) > label:nth-child(1) > input:nth-child(1)'); // 提取C选项答案 let ansC = document.querySelector('div.d-slt:nth-child(3) > label:nth-child(1) > span:nth-child(4)')?.innerText; // C选项是否被选中 let chC = document.querySelector('div.d-slt:nth-child(3) > label:nth-child(1) > input:nth-child(1)'); // 提取D选项答案 let ansD = document.querySelector('div.d-slt:nth-child(4) > label:nth-child(1) > span:nth-child(4)')?.innerText; // D选项是否被选中 let chD = document.querySelector('div.d-slt:nth-child(4) > label:nth-child(1) > input:nth-child(1)'); console.log(ansA, ansB, ansC, ansD); console.log(chA.checked, chB.checked, chC.checked, chD.checked); //查找答案的位置并选中正确选项 if (a == ansA) { chA.checked = true; chA.click(); console.log("点击了正确答案A"); } else if (a == ansB) { chB.checked = true; chB.click(); console.log("点击了正确答案B"); } else if (a == ansC) { chC.checked = true; chC.click(); console.log("点击了正确答案C"); } else if (a == ansD) { chD.checked = true; chD.click(); console.log("点击了正确答案D"); } //点击提交答案按钮 //延时0.5秒 setTimeout(document.querySelector('.blue').click(), 500); //点击关闭窗口按钮 //延时0.5秒 setTimeout(document.querySelector('.blue').click(), 500); } ```