welearn刷題指令碼自動答題新起點掛時長

小喵n發表於2020-10-22

軟體簡介:

WELearn隨行課堂一鍵自動刷課助手工具是一款電腦上的刷時長的課程學習的平臺,在WELearn隨行課堂刷時長工具中你可以體驗到一系列非常豐富的課程學習工具哦,一分鐘自動完成100%。“WE Learn”是一款集線上課程、學習資源、學習服務於一體的互動式自主學習軟體。該應用充分利用移動平臺特點,結合上海外語教育出版社權威教材資源,為學習者提供涵蓋聽、說、讀、寫、譯等多維度技能訓練平臺。輸入賬號密碼一鍵完成課程 可以自行選擇課程 正確率顯示為100% 已完成的章節會自動跳過


軟體下載:

https://www.lanzous.com/b01hjs3ih 

無需安裝任何瀏覽器外掛,開啟即可使用


使用效果圖:前後

2、核心原始碼

 Date.prototype.format = function () {
      var format = 'yyyy-MM-dd HH:mm:ss'
      var o = {
        'M+': this.getMonth() + 1, // month
        'd+': this.getDate(), // day
        'H+': this.getHours(), // hour
        'm+': this.getMinutes(), // minute
        's+': this.getSeconds(), // second
        'q+': Math.floor((this.getMonth() + 3) / 3), // quarter
        S: this.getMilliseconds() // millisecond
      }
 
      if (/(y+)/.test(format)) {
        format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
      };
 
      for (var k in o) {
        if (new RegExp('(' + k + ')').test(format)) {
          format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
        };
      };
      return format
    }
    $('<style></style>').text(getText(zjsqCss)).appendTo($('head'))
    $('body').append(getText(zjsqHtml))
    makeDivDraggable('zjsqInfoBoxId')
    zjsqInfoDom = $('#zjysqInfo')
    return true
  } catch (e) {
    log('初始化控制檯框架異常:' + e)
    return false
  };
};
 
function hrefParamsToArray (url) {
  return url
    .substring(url.indexOf('?') + 1)
    .split('&')
    .map((query) => query.split('='))
    .reduce((params, pairs) => (params[pairs[0]] = pairs[1] || '', params), {})
};
 
function studyProcessRequester (data) {
  function getProcessText () {
    return `[${new Date().format()}] 完成進度:(${totalCount}/${randomRequestTimes}) / 成功數:${successCount} / 失敗數:${failedCount}`
  };
 
  if (stopFlag === true) return 0
  var lessonId = `lesson${currentLessonIndex}`
  var successCount = 0
  var failedCount = 0
  var totalCount = 0
  var randomRequestTimes = Math.floor((Math.random() * 87) + 56)
  const requestData = {
    courseOpenId: data.courseOpenId,
    openClassId: data.openClassId,
    cellId: data.cellId,
    cellLogId: data.cellLogId,
    picNum: Math.round(324 / randomRequestTimes),
    studyNewlyTime: Math.round(14640 / randomRequestTimes),
    studyNewlyPicNum: Math.round(324 / randomRequestTimes),
    token: data.guIdToken
  }
  log(`第(${currentLessonIndex}/${hrefs.length})課,課件:${data.cellName},型別:[${data.categoryName}]`)
  log(`本次隨機學習時間:${(randomRequestTimes * 10 / 60).toFixed(2)}分鐘 總請求次數:${randomRequestTimes}`)
  log('現在開始上課!')
  zjsqInfoDom.append(`<div id="${lessonId}">${getProcessText()}</div>`)
  var ele = zjsqInfoDom[0]
  ele.scrollTop = ele.scrollHeight + 999
  var lessonProcessDom = $(`#${lessonId}`)
  for (let i = 0; i < randomRequestTimes; i++) {
    var defer = $.Deferred()
    $.ajax({
      async: true,
      timeout: 5000,
      type: 'post',
      url: urls2.Directory_stuProcessCellLog,
      data: requestData,
      dataType: 'json',
      success: function (responseData) {
        successCount += 1
      },
      error: function (response) {
        failedCount += 1
      },
      complete: function (response) {
        totalCount += 1
        lessonProcessDom.text(getProcessText())
        if (totalCount === randomRequestTimes) {
          totalStudyTime += randomRequestTimes * 10
          log(`當前課程(${lessonId}),已完成學習!三秒後開始下一課程...`)
          st(function () {
            return directoryDataRequester(currentLessonIndex)
          }, 4000)
        };
      }
    })
    requestData.picNum += Math.round(300 / randomRequestTimes)
    requestData.studyNewlyTime += Math.round(12640 / randomRequestTimes)
    requestData.studyNewlyPicNum += Math.round(300 / randomRequestTimes)
  };
  return defer
};
 
function directoryDataRequester (hrefIndex, changeDirectory = false, addData = false) {
  if (stopFlag === true) return 0
  var changedFlag = false
  if (hrefIndex < hrefs.length) {
    currentLessonIndex = hrefIndex + 1
    if (!addData && changeDirectory !== true) log(`正在獲取課件(${currentLessonIndex}/${hrefs.length})的請求令牌...`)
    var requestData = hrefParamsToArray(hrefs[hrefIndex])
    if (addData) {
      Object.assign(requestData, addData)
      console.log(requestData)
      delete (requestData.flag)
    };

 

相關文章