[Python] 纯文本查看 复制代码
import requests
from time import sleep
import json
import datetime
import re
from difflib import *
import random
import os
import configparser
try:
from notify import send
except:
print("无推送文件")
#------------------------------农夫任务----------------------
requests.packages.urllib3.disable_warnings()
tztoken=''#[url]http://pushplus.hxtrip.com/[/url]获取通知token,仅用户通知助力结果中是不是含有金虎水,我没用过...没通知了可能是结果里面没金虎水或者我也不知道干嘛了...
wxid={'b':['user_id=WXXXXXXXXXXXX1600711680',
'user_id=WXXXXXXXXXXXX1600711680',
'user_id=WXXXXXXXXXXXX1600711680',
'user_id=WXXXXXXXXXXXX1600711680',
'user_id=WXXXXXXXXXXXX1600711680',
'user_id=WXXXXXXXXXXXX1600711680',
'user_id=WXXXXXXXXXXXX1600711680']}
qdurl='https://nongfuwaterpro.kifa.site/api/v1/goldtiger/usersign'
fwurl='https://nongfuwaterpro.kifa.site/api/v1/goldtiger/userviewshop'
gkurl='https://nongfuwaterpro.kifa.site/api/v1/goldtiger/userviewvideo'
zlurl1='https://nongfuwaterpro.kifa.site/api/v1/goldtiger/specialuserassistance'
zlurl2='https://nongfuwaterpro.kifa.site/api/v1/goldtiger/completeassistancetask'
rwhea={"Host":"nongfuwaterpro.kifa.site","Connection":"keep-alive","Content-Length":"48","content-type":"application/x-www-form-urlencoded","unique_identity":"95bfa1bc-e0c3-4e14-878c-eacae997b863","actcode":"ACT39912445427025182721600711680","Accept-Encoding":"gzip,compress,br,deflate","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.16(0x1800103f) NetType/WIFI Language/zh_CN","Referer":"https://servicewechat.com/wxd79ec05386a78727/43/page-frame.html"}
cs=0
while True:
try:
yhs=wxid['b'][cs]
cs=cs+1
except:
print("共有用户:"+str(cs))
break
continue
kscs=0
zlcs=0
while True:
try:
try:
zldata1=wxid['b'][kscs]+'&assistance_'+wxid['b'][zlcs+1]
except:
zldata1=wxid['b'][kscs]+'&assistance_'+wxid['b'][1]
try:
zldata2=wxid['b'][kscs]+'&assistance_'+wxid['b'][zlcs+2]
except:
zldata2=wxid['b'][kscs]+'&assistance_'+wxid['b'][0]
zl1 = requests.post(headers=rwhea,url=zlurl1,data=zldata1,verify=False,timeout=3).json()
sleep(6)
zl2 = requests.post(headers=rwhea,url=zlurl1,data=zldata2,verify=False,timeout=3).json()
sleep(6)
print("用户:"+str(kscs+1)+"的助力结果\n"+str(zl1)+"\n"+str(zl2)+"\n")
kscs=kscs+1
zlcs=zlcs+1
except:
print("助力任务运行结束")
break
continue
kscs=0
while kscs < cs:
qd = requests.post(headers=rwhea,url=qdurl,data=wxid['b'][kscs],verify=False,timeout=3).json()
print("第"+str(kscs+1)+"个用户签到结果:"+str(qd)+"\n")
sleep(2)
fw = requests.post(headers=rwhea,url=fwurl,data=wxid['b'][kscs],verify=False,timeout=3).json()
print("第"+str(kscs+1)+"个用户访问商城结果:"+str(fw)+"\n")
sleep(2)
gkdata='url=https%3A%2F%2Fcdn.geement.com%2Fsfiles%2FNongFu%2FJinHuWater%2Fvideo.mov&'+wxid['b'][kscs]
gk = requests.post(headers=rwhea,url=gkurl,data=gkdata,verify=False,timeout=3).json()
print("第"+str(kscs+1)+"个用户观看视频结果:"+str(gk)+"\n")
sleep(2)
zl3 = requests.post(headers=rwhea,url=zlurl2,data=wxid['b'][kscs],verify=False,timeout=3).json()
print("第"+str(kscs+1)+"个用户助力领取结果:"+str(zl3)+"\n")
sleep(2)
zlurl3='https://nongfuwaterpro.kifa.site/api/v1/goldtiger/assistancewinlogs?'+wxid['b'][kscs]
zl4 = requests.get(url=zlurl3,timeout=3).json()
haojieguo='金虎水'
zljg=str(zl4)
zljg2=haojieguo in zljg
if zljg2 == True:
print("第"+str(kscs+1)+"个用户可能中了金虎水")
try:
tzurl='http://pushplus.hxtrip.com/send'
data={'token':tztoken,'title':'农夫任务','content':'助力结果有金虎水,请留意!','template':'html'}
headers={
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0",
'Content-Type': 'application/json'}
tz=requests.post(headers=headers,url=tzurl,data=json.dumps(data))
except:
print("通知token不正确或我也不知道没用过这个推送反正就是出错了没通知...")
try:
send("第"+str(kscs+1)+"个用户助力结果中有金虎水","自行查看")
except:
print("无推送文件")
else:
print("第"+str(kscs+1)+"个用户助力结果中无金虎水"+"\n")
kscs=kscs+1
continue
print("任务运行结束")