和田地区专业技术人员继续教育刷课脚本分享
# 平台情况
上周有个在和田地区工作的朋友找到我,说他们单位要求在和田地区专业技术人员继续教育平台上刷课。网址是 https://htzj.ylxue.net/Home/Index ,这是新疆和田地区专门给专业技术人员做的培训平台。
朋友姓赵,在当地一个单位做工程技术工作。他说白天跑现场、开会、写报告,晚上还得盯着电脑看那些法规课程,真的快扛不住了。疆内这段时间项目多工期紧,赵工每天忙得脚不沾地,哪还有心思坐下来一节一节看视频。
说实话我第一回进这个平台的时候,感觉界面做得还挺清楚的。左侧是课程分类,右侧是具体课程列表,点进去每门课分好几个章节。视频播放器用的是那种常见的,底下有进度条能看。但是呢,有个问题挺烦人的——视频播完了不会自动跳到下一节,得手动点"下一章"按钮,而且每隔十几分钟还得点一下屏幕,不然系统就提示你长时间未操作。
赵工说他们单位每年都有继续教育任务,学时不够的话影响考核。他去年底突击刷了三天,眼睛都快瞎了。今年不想再这么折腾,问我有没有什么办法。
# 脚本功能
针对和田地区专业技术人员继续教育平台的特点,脚本实现了以下功能:
视频全自动播放,进去之后自动开始播放,不用手动点播放按钮。自动切换下一章,检测到当前视频快播完时自动跳到下一节。防挂机检测模拟,隔段时间模拟一下鼠标移动,避免系统检测长时间无操作。倍速调节功能,支持1倍到2倍速播放。进度自动同步,确保学习记录上传成功。
脚本安装地址:
暂时下架
提示
如需代学,请联系客服,支持闲鱼交易。

微信联系:yizhituziang

QQ联系:2422270452
- img: /img/weixin.jpg
name: 微信联系:yizhituziang
- img: /img/qq.jpg
name: QQ联系:2422270452
# 使用感受
用了一段时间下来,感觉这个平台整体还行。视频加载速度在新疆范围内算不错的,有时候会有点小卡顿但不影响整体。课程内容覆盖面挺广,法规政策、专业技术、职业道德啥都有。
脚本跑起来比较稳,赵工说他现在下班前把浏览器打开挂着,第二天来的时候进度条已经跑满了。中间基本不用管,除非平台抽风弹个验证。
不太理想的地方是个别课程有课后测验,脚本暂时帮不上忙,得自己看题目做。还有就是人脸验证那关过不了,如果你那边平台要求人脸比对,那还是得自己来。
# 使用场景
第一种是工作太忙抽不出时间的,像赵工那样白天忙项目晚上还要兼顾家庭,根本没精力看课。第二种是课程内容之前学过的,就是要走个流程拿个学时的,用脚本挂着省心。第三种是想早点刷完早点解脱的,手动看太慢了,开倍速挂机效率高多了。
# 技术细节
平台用的是通用的在线教育框架,视频播放器兼容性还行。脚本通过定时检测视频播放状态来判断进度,配合课程列表DOM结构找到下一节。
防挂机这块,脚本会模拟鼠标轻微移动和点击操作,让系统认为是正常用户在操作。这个间隔时间设的比较合理,不会太频繁也不会太久。
整体来说技术方案比较成熟,针对和田这个平台做了适配,稳定性还不错。
# 常见问题
脚本安装地址暂时下架,有需要找页面底部联系方式。
倍速怎么选?建议1.5倍左右,和田这边网络质量还行,太快了怕加载跟不上。
浏览器用什么好?Chrome或Edge都可以,360浏览器要开极速模式。
进度不同步怎么办?刷新重试,脚本会自动从上次位置继续。
课后测验能自动做吗?暂时不支持,题目得自己看。
# 结束语
和田地区专业技术人员继续教育平台是疆内兄弟们每年都要打交道的,任务重时间紧的情况下确实让人头疼。脚本能帮你省去大部分盯屏幕的时间,赵工用了说好,终于不用加班刷课了。
# 核心代码
(function() {
'use strict';
const CONFIG = {
checkInterval: 3000,
nextChapterDelay: 2500,
activityInterval: 12000,
minWatchPercent: 92,
storageKey: 'htzj_auto_enabled'
};
let state = {
isRunning: false,
currentCourseIndex: 0,
completedCourses: 0,
totalCourses: 0,
lastActivityTime: Date.now(),
currentSpeed: 1.0
};
function log(msg) {
console.log(`[和田继续教育] ${msg}`);
}
function init() {
const enabled = localStorage.getItem(CONFIG.storageKey);
if (enabled === '0') {
log('自动学习已暂停');
return;
}
state.isRunning = true;
log('和田地区专业技术人员继续教育自动学习脚本已启动');
startAutoPlay();
}
function findVideoElement() {
const selectors = [
'video',
'#video_player video',
'.player-video video',
'.course-video video',
'.video-js video',
'.vjs-video video'
];
for (const sel of selectors) {
const el = document.querySelector(sel);
if (el && el.duration > 0) {
return el;
}
}
return null;
}
function findPlayerContainer() {
const containers = [
'.player-container',
'#video_player',
'.course-player',
'.video-container',
'.vjs-container'
];
for (const sel of containers) {
const el = document.querySelector(sel);
if (el) return el;
}
return null;
}
function isVideoPlaying(video) {
return video && !video.paused && !video.ended && video.readyState > 2;
}
function getVideoProgress(video) {
if (!video || !video.duration) return 0;
return (video.currentTime / video.duration) * 100;
}
function playVideo(video) {
if (!video) return false;
try {
if (video.paused) {
const promise = video.play();
if (promise && promise.catch) {
promise.catch(err => {
log(`播放失败: ${err.message}`);
});
}
}
return true;
} catch (e) {
log(`播放异常: ${e.message}`);
return false;
}
}
function setVideoSpeed(video, speed) {
if (!video) return;
try {
video.playbackRate = speed;
state.currentSpeed = speed;
log(`播放倍速已调整为 ${speed}x`);
} catch (e) {
log(`倍速设置失败: ${e.message}`);
}
}
function simulateActivity() {
const now = Date.now();
if (now - state.lastActivityTime > CONFIG.activityInterval) {
const container = findPlayerContainer();
if (container) {
const rect = container.getBoundingClientRect();
const x = rect.left + Math.random() * rect.width;
const y = rect.top + Math.random() * rect.height;
const mouseEvent = new MouseEvent('mousemove', {
clientX: x,
clientY: y,
bubbles: true
});
document.dispatchEvent(mouseEvent);
setTimeout(() => {
const clickEvent = new MouseEvent('click', {
clientX: x,
clientY: y,
bubbles: true
});
document.dispatchEvent(clickEvent);
}, 500);
state.lastActivityTime = now;
log('已模拟用户活动,防挂机检测');
}
}
}
function checkVideoAndHandle() {
const video = findVideoElement();
if (!video) {
setTimeout(checkVideoAndHandle, CONFIG.checkInterval);
return;
}
if (!isVideoPlaying(video)) {
playVideo(video);
}
const progress = getVideoProgress(video);
if (progress > CONFIG.minWatchPercent || video.ended) {
log(`当前视频进度: ${progress.toFixed(1)}%,准备切换下一节`);
switchToNextCourse();
}
simulateActivity();
setTimeout(checkVideoAndHandle, CONFIG.checkInterval);
}
function switchToNextCourse() {
const nextButtons = document.querySelectorAll('.next-chapter, .btn-next, .next-btn, [class*="next"]');
for (const btn of nextButtons) {
if (btn.offsetParent !== null && !btn.disabled) {
btn.click();
log('已点击下一章按钮');
state.completedCourses++;
setTimeout(() => {
checkVideoAndHandle();
}, CONFIG.nextChapterDelay);
return;
}
}
const courseList = document.querySelectorAll('.course-item, .chapter-item, .lesson-item');
let foundCurrent = false;
for (const item of courseList) {
const isCompleted = item.querySelector('.status-done, .completed, .finish');
const isActive = item.classList.contains('active') || item.classList.contains('current');
if (foundCurrent && !isCompleted) {
item.click();
log('已切换到下一个未完成课程');
setTimeout(() => {
checkVideoAndHandle();
}, CONFIG.nextChapterDelay);
return;
}
if (isActive) {
foundCurrent = true;
}
}
log('未找到下一课程或已全部完成');
}
function startAutoPlay() {
log('开始自动播放检测');
setTimeout(() => {
checkVideoAndHandle();
}, 2000);
}
function stopAutoPlay() {
state.isRunning = false;
localStorage.setItem(CONFIG.storageKey, '0');
log('自动学习已暂停');
}
function toggleAutoPlay() {
if (state.isRunning) {
stopAutoPlay();
} else {
state.isRunning = true;
localStorage.setItem(CONFIG.storageKey, '1');
log('自动学习已恢复');
startAutoPlay();
}
}
function setSpeed(speed) {
const video = findVideoElement();
if (video) {
setVideoSpeed(video, speed);
} else {
log('未找到视频元素,无法设置倍速');
}
}
function createControlPanel() {
const existing = document.getElementById('htzj-control-panel');
if (existing) return;
const panel = document.createElement('div');
panel.id = 'htzj-control-panel';
panel.style.cssText = `
position: fixed;
top: 20px;
right: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 15px 20px;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
z-index: 999999;
font-size: 14px;
min-width: 200px;
`;
panel.innerHTML = `
<div style="font-weight: bold; margin-bottom: 10px; font-size: 15px;">
和田继续教育自动学习
</div>
<div style="margin-bottom: 8px;">状态: <span id="htzj-status">运行中</span></div>
<div style="margin-bottom: 8px;">已完成: <span id="htzj-completed">0</span> 节</div>
<div style="margin-bottom: 12px;">倍速: <span id="htzj-speed">1.0</span>x</div>
<div style="display: flex; gap: 8px; flex-wrap: wrap;">
<button onclick="window.toggleHtzjAutoPlay()" style="
padding: 6px 12px;
border: none;
border-radius: 6px;
cursor: pointer;
background: rgba(255,255,255,0.2);
color: white;
font-size: 12px;
">暂停</button>
<button onclick="window.setHtzjSpeed(1.0)" style="
padding: 6px 12px;
border: none;
border-radius: 6px;
cursor: pointer;
background: rgba(255,255,255,0.2);
color: white;
font-size: 12px;
">1x</button>
<button onclick="window.setHtzjSpeed(1.5)" style="
padding: 6px 12px;
border: none;
border-radius: 6px;
cursor: pointer;
background: rgba(255,255,255,0.2);
color: white;
font-size: 12px;
">1.5x</button>
<button onclick="window.setHtzjSpeed(2.0)" style="
padding: 6px 12px;
border: none;
border-radius: 6px;
cursor: pointer;
background: rgba(255,255,255,0.2);
color: white;
font-size: 12px;
">2x</button>
</div>
`;
document.body.appendChild(panel);
window.toggleHtzjAutoPlay = toggleAutoPlay;
window.setHtzjSpeed = setSpeed;
setInterval(() => {
const statusEl = document.getElementById('htzj-status');
const completedEl = document.getElementById('htzj-completed');
const speedEl = document.getElementById('htzj-speed');
if (statusEl) statusEl.textContent = state.isRunning ? '运行中' : '已暂停';
if (completedEl) completedEl.textContent = state.completedCourses;
if (speedEl) speedEl.textContent = state.currentSpeed.toFixed(1);
}, 1000);
}
function observeVideoChanges() {
const observer = new MutationObserver(() => {
if (state.isRunning && !document.getElementById('htzj-control-panel')) {
createControlPanel();
}
});
observer.observe(document.body, { childList: true, subtree: true });
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => {
init();
createControlPanel();
observeVideoChanges();
});
} else {
init();
createControlPanel();
observeVideoChanges();
}
})();