import tkinter
print(tkinter.TkVersion)
Tampermonkey脚本
// ==UserScript==
// @name 国培计划挂机
// @namespace http://herokay.cn/
// @version 0.1
// @description try to take over the world!
// @author herokay
// @match http://nxgp2019.w.px.teacher.com.cn/home/student/*/course/learn/*
// @grant none
// @require file:///D:/ocrad.js
// ==/UserScript==
(function() {
'use strict';
// Your code here...
window.alert = function(txt)
{
console.info(txt);
}
function recognize_image()
{
OCRAD(document.getElementById("pxCheckCode"), {
numeric: true
}, function(text){
$('#inputvalcode1').val(text);
console.info( text);
$('#comfirmButtonTo').click();
})
}
function run()
{
// recognize_image() ;
//console.info(TimeNum);
if(TimeNum>600)
{
if( $('#btn_min').attr('class')=='max')
{
btnOclick();
setTimeout("$('#inputvalcode1').click();",5000);
}
else
{
setTimeout("$('#inputvalcode1').click();",5000);
}
if($("#pxCheckCode").is(":visible"))
{
recognize_image();
}
}
}
setInterval(run, 10000);
})();
将ocrd.js文件放入D盘根目录
Tampermonkey插件设置为可访问本地文件
ocrad.zip
sudo apt-get update
sudo apt-get install php7.3-fpm php7.3-cli php7.3-curl php7.3-gd php7.3-cgi
sudo apt-get install php7.3-mysqli
sudo service php7.3-fpm restart
sudo apt-get install nginx
sudo service nginx start
sudo nano /etc/nginx/sites-available/default
sudo service nginx restart
sudo apt install mariadb-server
create user pi@localhost identified by 'raspberry';
grant all privileges on *.* to pi@localhost identified by 'raspberry';
flush privileges;
参考:http://shumeipai.nxez.com/2018/04/25/install-pi-dashboard-with-nginx-php7-on-pi.html
网址:http://ningxia-zxkt.dpyfjy.com/
Console代码
$(".t-p-is-options").each(function()
{
var shijiAnswer=$(this).find(".shijiAnswer").val();
var ans=$(this).find(".user_answer\[value='"+shijiAnswer+"'\]");
ans.click();
})