涉政数美脚本
// ==UserScript==
// @name 涉政数美脚本
// @namespace http://tampermonkey.net/
// @version 0.314
// @description try to take over the world!
// @author You
// @match https://console.ishumei.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ishumei.com
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_listValues
// @grant GM.setClipboard
// ==/UserScript==
let Container = document.createElement('div');
Container.id = "sp-ac-container";
Container.style.position="fixed"
Container.style.left="465px"
Container.style.top="10px"
Container.style['z-index']="999999"
Container.innerHTML =`<input type="button" value="复制数据" id="kaishi"><input type="button" value="开始" id="kaishi1">`
document.body.appendChild(Container)
function sleep(d){
for(var t = Date.now();Date.now()-t<=d;){}
}
function log(tx){
console.log(tx)
}
var jishi = 0
var renwu;
var renwu1;
var renwu2;
kaishi.onclick=function(){
//document.querySelector("body > div:nth-child(14) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div.ant-select-item.ant-select-item-option.ant-select-item-option-active.ant-select-item-option-selected")
//document.querySelector("body > div:nth-child(14) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div.ant-select-item.ant-select-item-option.ant-select-item-option-active")
if(document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs")){
if(document.querySelector("body > div:nth-child(13) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")||
document.querySelector("body > div:nth-child(14) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")||
document.querySelector("body > div:nth-child(15) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")||
document.querySelector("body > div:nth-child(16) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")||
document.querySelector("body > div:nth-child(17) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")){
renwu = setInterval(djys,1900)
renwu1 = setInterval(bcsj,2200)
renwu2 = setTimeout(jishi=0,30000)
}else{
alert("请先点击[全部]下拉框!")
}
}else{
alert("请进入数据统计界面!")
}
}
kaishi1.onclick=function(){
if((document.location.href.indexOf("https://console.ishumei.com/new/tianjing/text/history/text") !== -1)){
var biao = document.querySelectorAll("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.table-list___15Pgx > div > div:nth-child(2) > div > div > div > div > div > div.ant-table-body > table > tbody > tr")
var biaobtn = document.querySelectorAll("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.table-list___15Pgx > div > div:nth-child(2) > div > div > div > div > div > div.ant-table-body > table > tbody > tr> td:nth-child(13)")
var biaousx = document.querySelectorAll("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.table-list___15Pgx > div > div:nth-child(2) > div > div > div > div > div > div.ant-table-body > table > tbody > tr> td:nth-child(3)")
var biaouid = document.querySelectorAll("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.table-list___15Pgx > div > div:nth-child(2) > div > div > div > div > div > div.ant-table-body > table > tbody > tr> td:nth-child(4)")
console.log(biao)
if(biao.length<20){
alert("请在页面加载完成后点击[开始]按钮!")
}else{
for(let i =1;i<biao.length;i++){
biaobtn[i].onclick = function(){
console.log(i)
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.table-list___15Pgx > div > div:nth-child(2) > div > div > div > div > div > div.ant-table-body > table > tbody > tr:nth-child("+(i+1)+") > td:nth-child(3)").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.table-list___15Pgx > div > div:nth-child(2) > div > div > div > div > div > div.ant-table-body > table > tbody > tr:nth-child("+(i+1)+") > td:nth-child(4)").innerText
console.log(shuju1)
console.log(shuju2)
if(shuju1 == "帖子"){
window.open("http://admin.bbs3839.5054399.com/bbs/topic-hasAudit.html?req[uid]="+shuju2+"&req[sid]=&req[id]=&req[risk_level]=-1&req[risk_type]=100&req[time][from]=&req[time][to]=&req[self]=0&req[tag]=0&req[status]=0&req[keyword]=&req[type]=0&req[is_solve]=0&req[reply_status]=0&req[exact_keyword]=&req[section_group_id]=0&req[is_official]=0&req[min_word_length]=&req[max_word_length]=&req[from_client]=0&req[ip]=")
}else if(shuju1 == "帖子评论"){
window.open("http://admin.bbs3839.5054399.com/bbs/comment-hasAudit.html?req[uid]="+shuju2+"&req[sid]=&req[reply_id]=&req[tid]=&req[id]=&req[risk_level]=-1&req[risk_type]=100&req[keyword]=&req[time][from]&req[time][to]&req[is_essence]=0&req[self]=0&req[status]=0&req[pass_time][from]=&req[pass_time][to]=&req[exact_keyword]=&req[section_group_id]=0&req[min_word_length]=&req[max_word_length]=&req[from_client]=0&req[light_status]=-1&req[audit_light_client]=-1&req[ip]=")
window.open("http://admin.bbs3839.5054399.com/bbs/reply-hasAudit.html?req[uid]="+shuju2+"&req[sid]=&req[tid]=&req[id]=&req[risk_level]=-1&req[risk_type]=100&req[keyword]=&req[time][from]=&req[time][to]=&req[is_essence]=0&req[self]=0&req[status]=0&req[pass_time][from]=&req[pass_time][to]=&req[exact_keyword]=&req[is_top]=0&req[section_group_id]=0&req[min_word_length]=&req[max_word_length]=&req[from_client]=0&req[light_status]=-1&req[audit_light_client]=-1&req[ip]=")
}else if(shuju1 == "评论"){
window.open("http://admin.bbs3839.5054399.com/comment/gameComment-hasAudit.html?req[state_private]=4&req[state_high]=2&req[is_pcs]=2&req[state_pcs]=100&req[istop]=2&req[fid]=&req[cid]=&req[uid]="+shuju2+"&req[edit]=0&req[content]=&req[time_from]=&req[time_to]=&req[ip]=&req[length_from]=&req[length_to]=&req[star_from]=&req[star_to]=&req[adminid]=&req[is_fold]=0&req[original_pid]=0&req[from_client]=0")
}else if(shuju1 == "评论回复"){
window.open("http://admin.bbs3839.5054399.com/comment/gameReply-hasAudit.html?req[state_private]=5&req[fid]=&req[cid]=&req[id]=&req[content]=&req[identity]=100&req[time_from]=&req[time_to]=&req[adminname]=&req[uid]="+shuju2+"&req[ip]=&req[length_from]=&req[length_to]=")
}else if(shuju1 == "个性签名"){
window.open("http://admin.newsapp.5054399.com/ucenter/ucenter.signature.validating.php?ac=list&uid="+shuju2+"&content=&state=1")
}else if(shuju1 == "昵称"){
window.open("http://admin.newsapp.5054399.com/ucenter/ucenter.nickname.list.php?ac=progress&bid=59175561&uid="+shuju2+"&nickname=&lock=0&admin=0&state=1&b_time=&e_time=&identify=0")
}
}
}
}
}else{
alert("请在文本记录页面后,再点击[开始]按钮!")
}
}
function bcsj(){
let biaoti = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.search-form___L2TTR > form > div:nth-child(2) > div > div > div > div > div > div > div > span.ant-select-selection-item").title
if(biaoti == "全部"){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("全部数据1",shuju1)
GM_setValue("全部数据2",shuju2)
GM_setValue("全部数据3",shuju3)
}else if(biaoti == "帖子(ARTICLE)" ){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("帖子数据1",shuju1)
GM_setValue("帖子数据2",shuju2)
GM_setValue("帖子数据3",shuju3)
}else if(biaoti == "帖子评论(ARTICLE_COMMENT)" ){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("帖子评论数据1",shuju1)
GM_setValue("帖子评论数据2",shuju2)
GM_setValue("帖子评论数据3",shuju3)
}else if(biaoti == "评论(COMMENT)" ){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("评论数据1",shuju1)
GM_setValue("评论数据2",shuju2)
GM_setValue("评论数据3",shuju3)
}else if(biaoti == "评论回复(COMMENT_REPLY)" ){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("评论回复数据1",shuju1)
GM_setValue("评论回复数据2",shuju2)
GM_setValue("评论回复数据3",shuju3)
}else if(biaoti == "昵称(NICKNAME)" ){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("昵称数据1",shuju1)
GM_setValue("昵称数据2",shuju2)
GM_setValue("昵称数据3",shuju3)
}else if(biaoti == "个性签名(SIGNATURE)" ){
let shuju1 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(1) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju2 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(2) > div > div > div > span.sm-card-total___1yDRs").innerText
let shuju3 = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.sm-statistic-wrapper___2RFSz > div > div:nth-child(3) > div > div > div > span.sm-card-total___1yDRs").innerText
console.log(shuju1)
console.log(shuju2)
console.log(shuju3)
GM_setValue("个签数据1",shuju1)
GM_setValue("个签数据2",shuju2)
GM_setValue("个签数据3",shuju3)
}
if(jishi == 8){
alert("复制完成")
let fuzhi =
GM_getValue("个签数据1")+" "+GM_getValue("个签数据2")+" "+GM_getValue("个签数据3")+"\n"+
GM_getValue("昵称数据1")+" "+GM_getValue("昵称数据2")+" "+GM_getValue("昵称数据3")+"\n"+
GM_getValue("评论数据1")+" "+GM_getValue("评论数据2")+" "+GM_getValue("评论数据3")+"\n"+
GM_getValue("评论回复数据1")+" "+GM_getValue("评论回复数据2")+" "+GM_getValue("评论回复数据3")+"\n"+
GM_getValue("帖子数据1")+" "+GM_getValue("帖子数据2")+" "+GM_getValue("帖子数据3")+"\n"+
GM_getValue("帖子评论数据1")+" "+GM_getValue("帖子评论数据2")+" "+GM_getValue("帖子评论数据3")+"\n"+
GM_getValue("全部数据1")+" "+GM_getValue("全部数据2")+" "+GM_getValue("全部数据3")+"\n"
GM.setClipboard(fuzhi)
clearInterval(renwu1)
}
}
function djys(){
jishi++
if(jishi == 4){
jishi++
}
console.log(jishi)
if(document.querySelector("body > div:nth-child(13) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")){
document.querySelector("body > div:nth-child(13) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div:nth-child("+jishi+")").click()}
if(document.querySelector("body > div:nth-child(14) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")){
document.querySelector("body > div:nth-child(14) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div:nth-child("+jishi+")").click()}
if(document.querySelector("body > div:nth-child(15) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")){
document.querySelector("body > div:nth-child(15) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div:nth-child("+jishi+")").click()}
if(document.querySelector("body > div:nth-child(16) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")){
document.querySelector("body > div:nth-child(16) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div:nth-child("+jishi+")").click()}
if(document.querySelector("body > div:nth-child(17) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div")){
document.querySelector("body > div:nth-child(17) > div > div > div > div.rc-virtual-list > div.rc-virtual-list-holder > div > div > div:nth-child("+jishi+")").click()}
//pd()
if(jishi == 8){
clearInterval(renwu)
}
}
function pd(){
let biaoti = document.querySelector("#top-left-layout-content > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div.search-form___L2TTR > form > div:nth-child(2) > div > div > div > div > div > div > div > span.ant-select-selection-item").title
if(jishi == 1&&biaoti == "全部"){
log(biaoti)
sleep(1000)
bcsj()
}else if(jishi == 2&&biaoti == "帖子(ARTICLE)"){
log(biaoti)
sleep(1000)
bcsj()
}else if(jishi == 3&&biaoti == "帖子评论(ARTICLE_COMMENT)"){
log(biaoti)
sleep(1000)
bcsj()
}else if(jishi == 5&&biaoti == "评论(COMMENT)"){
log(biaoti)
sleep(1000)
bcsj()
}else if(jishi == 6&&biaoti == "评论回复(COMMENT_REPLY)"){
log(biaoti)
sleep(1000)
bcsj()
}else if(jishi == 7&&biaoti == "昵称(NICKNAME)"){
log(biaoti)
sleep(1000)
bcsj()
}else if(jishi == 8&&biaoti == "个性签名(SIGNATURE)"){
log(biaoti)
sleep(1000)
bcsj()
}
}