版权属于:
小江同学的个人博客分享 代看啦 97 娜娜 飞飞 乐跑代跑 运动世界
作品采用:
《
署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
》许可协议授权
周口市继续教育平台自动刷课代码
// 周口市继续教育平台 http://www.zkjxjy.com/
// 自动提交问题
// 用极速模式进入课程后,按F12,在控制台内执行以下代码
// 出现 播放检测中。。。。。 算正常(30秒后出现)
// 视频更换后要重来一次
function continueLearning() {
console.log('播放检测中。。。。。');
var exam = $('.m-exam-dialog');
if (exam[0] != undefined) {
console.log('出现题目。。。。');
// 计算题目结果
if ($('.d-qus-body', exam)[0].attributes['data-id'].nodeValue == 'topic') {
var topic = $('.d-qus-body', exam)[0].innerText;
// topic = topic.replace(/\s+/g, '');
var value = topic.match(/\d/g);
$.each(value, function(i, n) {
value[i] = parseInt(n);
})
var operator = topic.match(/[\+\-x]/)[0];
console.log(topic + " 取运算符:" + operator);
var result = 0;
switch (operator) {
case '+':
result = value[0] + value[1];
break;
case '-':
result = value[0] - value[1];
break;
case 'x':
result = value[0] * value[1];
break;
case '/':
result = value[0] / value[1];
break;
default:
console.log('continueLearning计算错误。。。。。');
}
}
console.log("运算数" + value + " 运算符:" + operator + " 结果:" + result);
// 选择正确选项,模拟提交
var options = $.trim($('.ipt-txt-content', exam).text());
options = options.split(/\s+/);
console.log("选项有" + options.length + "个")
var correct = undefined;
$.each(options, function(i, n) {
if (parseInt(options[i]) - result == 0) {
correct = i
}
})
console.log("正解是第" + correct + "个,准备继续播放。。。");
if (correct != undefined) {
$('input', exam)[correct].click();
setTimeout(function() {
$('button', exam)[0].click();
}, 3000);
setTimeout(function() {
$('button', exam)[0].click();
}, 5000);
}
}
}
setInterval("continueLearning()", 30000);
————————————————
版权声明:本文为CSDN博主「vistacyy」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/vistacyy/article/details/91399091
评论 (0)