【网课必备】2022年最新智慧树网课自动刷课神器 附代码

作者:热心网友 | 发布时间: | 更新时间:

免责声明

以下教程仅用于个人研究、学习代码目的,为各位同学节省宝贵的学习时间,请勿用于商业用途。

data-postsbox="{"id":16505,"title":"智慧树刷课 自动化脚本工具 | Python脚本","author":"FancyPig","author_id":1,"cover_image":"https://static.pigsec.cn/wp-content/uploads/2022/05/20220523054058736.png","cover_video":"","views":73006,"comment_count":1648,"category":"knowledge","is_forum_post":false}">{"id":16505,"title":"智慧树刷课 自动化脚本工具 | Python脚本","author":"FancyPig","author_id":1,"cover_image":"https://static.pigsec.cn/wp-content/uploads/2022/05/20220523054058736.png","cover_video":"","views":73006,"comment_count":1648,"category":"knowledge","is_forum_post":false}

相关阅读

之前我们的热心网友写过一篇关于Mooc大学的网课脚本,模拟人手快速刷课。

对于一些不太优质的科目,给各位小伙伴们节省了很多时间

[postsbox post_id="2020"]
data-postsbox="{"id":15986,"title":"超星学习通刷课 自动化脚本工具 | 完成任务点","author":"FancyPig","author_id":1,"cover_image":"https://static.pigsec.cn/wp-content/uploads/2022/05/20220516051953389.png","cover_video":"","views":117551,"comment_count":229,"category":"knowledge","is_forum_post":false}">{"id":15986,"title":"超星学习通刷课 自动化脚本工具 | 完成任务点","author":"FancyPig","author_id":1,"cover_image":"https://static.pigsec.cn/wp-content/uploads/2022/05/20220516051953389.png","cover_video":"","views":117551,"comment_count":229,"category":"knowledge","is_forum_post":false}

今天要给大家分享的是智慧树网课刷课相关的教程

可以通过js代码,实现1.5倍速度、静音播放视频,如果出现答题互动会自动选择第一个选项。

视频教程

简单两步搞定,智慧树网课自动刷课

图文教程

我们以Java程序设计(华东交通大学)课程为例

我们可以看到,网站本身是支持1.5倍播放速率的,因此1.5倍速播放从而产生的时间上加速不会出现异常!

我们按F12,打开开发者工具,选择Console(控制台)

可以看到智慧树这边在开发的时候还是统计了诸多细节

例如观看总时长提交进度时间点击播放暂停按钮记录都有,可以看到整体的监控效果做的还是不错的

不过上有政策,下有对策

我们在Console(控制台)中,输入相关代码,然后回车

之后,你会发现,视频速度会被自动切换到1.5倍,而且你点了暂停,浏览器会自动切换到播放,所以停不下来了就,会一直播放,然后,你只需要挂在浏览器就好了。

答题部分还是交给自己吧,课都不看了,答题是不是应该花点时间自己答一下呢?

相关代码

(function() {
 'use strict';
 const $ = window.jQuery;
 var zhs_halt = false;

 function keeping() {
  if ( zhs_halt ) return;

  // 读取视频时长计算标识
  var video_finished = $(".current_play b").hasClass("time_icofinish");

  // 暂停后自动播放
  if ( $("video")[0].paused && !video_finished ) {
   $("#playButton").click();
  }

  // 自动切换下一个视频
  if ( video_finished ) {
   // 点击 next 按钮
   // $("#nextBtn").click();
   // 由于智慧树网页设计问题,在一定情况下点击 next 按钮后无法跳转到视频页面,故采用模拟点击方法
   var current_video = $(".video.current_play");
   var videos = $(".video");
   var click = false;
   $(".video").each(function(){
    if( click ){
     $(this).click();
     click = false;
    }
    if($(this).hasClass("current_play")) click = true;
   })
  }

  // 静音
  if ( $("video")[0].volume ) {
   $(".volumeIcon")[0].click();
  }

  // 自动切换到1.5倍
  if ( $("video")[0].playbackRate != 1.5 ) {
   $(".speedTab15")[0].click();
  }

  // 弹题自动选择第一个选项
  if ( $(".dialog-test").length ) {
   var test = $(".dialog-test");
   var test_option = test.find(".topic-item").length - 1;
   test_option = parseInt( Math.random() * test_option );
   test.find(".topic-item")[test_option].click();
   test.find(".dialog-footer").find(".btn")[0].click();
   $("#playButton").click();
  }

 }

 $(window).ready(function(){
  setInterval(keeping, 3000);
 })

})();

标签:刷课, 智慧树网课自动刷课, 智慧树, 智慧树刷课脚本, 智慧树刷课js, 智慧树快速刷课, 智慧树刷课