帮网友写的一个自动签到脚本(湖北联通)

听他说每天签到有奖励吧。有需要使用的可自行关注湖北联通,然后抓包获取Authorization值,然后挂到腾讯的云函数即可,可设置触发方式为每天凌晨
测试结果.jpg这是测试结果
20200308_13h46_35.png20200308_13h48_53.png
下面是源代码

# -*- coding: utf8 -*-
import requests
import json
from urllib.parse import quote
import time
##设置自己的Authorization
###设置server酱的sckey    server酱官网:http://sc.ftqq.com
sckey = ""
Authorization=""
def qd():
    url = "https://wap.10010hb.net/zinfo/activity/signin/everyday"
    headers = {
        "Host": "wap.10010hb.net",
        "zx": "12",
        "Authorization": ""+Authorization,
        "User-Agent": "Mozilla/5.0 (Linux; Android 9; MI MAX 3 Build/PKQ1.181121.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/045111 Mobile Safari/537.36 MMWEBID/8882 MicroMessenger/7.0.10.1580(0x27000A87) Process/tools NetType/4G Language/zh_CN ABI/arm64",
        "Referer": "https://wap.10010hb.net/zinfo/wt/activity/sign/index?zx=12"
    }
    html = requests.post(url, headers=headers)
    ##通过json处理数据 变成dict
    data = json.loads(html.text)
    if data["alertMsg"] == "操作成功":
        print("签到成功")
        ##发送签到信息到server酱
        requests.get('https://sc.ftqq.com/' + sckey + '.send?text=' + quote('湖北联通自动签到成功~'+time.strftime('%Y.%m.%d',time.localtime(time.time()))))
    elif data["alertMsg"] == "今日已签到,请勿重复签到":
        print("今日已签到,请勿重复签到")
        ##发送签到信息到server酱
        requests.get('https://sc.ftqq.com/' + sckey + '.send?text=' + quote('今日已签到,请勿重复签到'+time.strftime('%Y.%m.%d',time.localtime(time.time()))))
    else:
        print("签到失败")
        ##发送签到信息到server酱
        requests.get('https://sc.ftqq.com/' + sckey + '.send?text=' + quote('湖北联通自动签到失败~QAQ'+time.strftime('%Y.%m.%d',time.localtime(time.time()))))
def main_handler(event, context):
    return qd()
# Python  

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×