Обсуждения » Хотелки

有没有大手子来破解一下广东省专业技术人员公需课视频自动播放https://ggfw.gdhrss.gov.cn/

就是自动回答弹出问题,播完自动下一个视频,谢谢各位大哥,先给大哥磕个头
以前有人做过但是已经失效了,打开网页就404
// ==UserScript==
// @name 广东省专技网继续教育平台学习辅助工具
// @namespace https://greasyforks.org
// @version 0.3
// @description 自动视频学习
// @author midpoint
// @match *://ggfw.gdhrss.gov.cn/zxpx/auc/play/player?*
// @run-at document-end
// @grant none
// ==/UserScript==
function geturls(urls){
var url=$('.content-learning,.content-unstart').each(function () {
var str;
str=$(this).parent().attr('href');
str=str.match(/\('(.+)'\)/);
if(str!=null)
{urls.push('http://'+document.domain+str[1]);}
else
{urls.push(location.href);}
});
console.log('urls length:'+urls.length);
}

function start() {
console.log('稍等,准备一下,几秒钟后开始学习……');
if(typeof tm1!=="undefined") { clearInterval(tm1); };
if(typeof tm2!=="undefined") { clearTimeout(tm2); };
var urls=[];
geturls(urls);

var count=0;
var unfinish=false;
var str='';
if (window.top == window.self) {
frm='\n';
frm+='';
with(document) {
write(frm);
void(close());
}
}
var ifr=window.frames['gx'];
// var doc=ifr.document;
var doc=window.frames['gx'].document;
var tm1=setInterval(function() {
str=$(doc).find('.learnpercent').text();
if(str.indexOf('完成')>0) {
unfinish=false;
count++;
}
$(doc).find('.prism-big-play-btn pause').click();
if(unfinish || count>urls.length) return;

unfinish=true;
console.log('count:'+count);
console.log('urls[count]:'+urls[count]);
$(doc).find('#gx').src=urls[count];
document.getElementById("gx").src=urls[count];
if(typeof tm2!=="undefined") { clearTimeout(tm2); }
var tm2=setTimeout(function() {
//doc=ifr.document;
doc=window.frames['gx'].document;
$(doc).find('.prism-big-play-btn').click();
$(doc).find('.prism-button prism-button-retry').click();
ifr.getTimu=function(index) {
return false;
}
}, 2000);
}, 3000);
return '祝大家快乐学习!健康生活!';
}
start();

Ответить

Войдите, чтобы ответить.

长期地址
遇到问题?请前往 GitHub 提 Issues。