惠小助线报机器人为您实时提供全网最新羊毛活动线报网

WPS云函数签到人数不够解决方法-自测已满10个

只要是让你充钱的100%都是骗子,切记不要充1分钱!

遇到问题:1.源代码邀请人数不够,2.修改代码后邀请人数依然不够

解决步骤:1.修改代码 2.多次触发

1.修改代码

源代码为大神的:

免费WPS会员腾讯云函数Python脚本-2021-3-1 更新https://www.52pojie.cn/thread-1378144-1-1.html (出处: 吾爱破解论坛)

修改后代码import requests

import pytz

import datetime

from io import StringIO

import time

# 初始化信息

SCKEY = 'xxxxxxxxxxxxxxxxxxxxxxxx' # '*********复制SERVER酱的SCKEY进来*************(保留引号)'

data = {

"wps_invite": [

{

"name": "自定义名称或者你WPS会员名",

"invite_userid": 123456789, # "*********复制手机WPS个人信息中的用户ID进来,类似括号内容(123456789)*************(不保留双引号)",

"sid": "xxxxxxxxxx" # network获取wps_sid

}

]

}

# 初始化日志

sio = StringIO('WPS签到日志\n\n')

sio.seek(0, 2) # 将读写位置移动到结尾

s = requests.session()

tz = pytz.timezone('Asia/Shanghai')

nowtime = datetime.datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S")

sio.write("-" + nowtime + "-\n\n")

# APP

def pushWechat(desp, nowtime):

ssckey = SCKEY

send_url = 'https://sctapi.ftqq.com/' + ssckey + '.send'

if '失败' in desp:

params = {

'title': 'WPS小程序邀请失败提醒' + nowtime,

'desp': desp

}

else:

params = {

'title': 'WPS小程序邀请成功' + nowtime,

'desp': desp

}

requests.post(send_url, params=params)

# 主函数

def main():

wps_inv = data['wps_invite']

# 这13个账号被邀请

invite_sid = [

"V02StVuaNcoKrZ3BuvJQ1FcFS_xnG2k00af250d4002664c02f",

"V02SWIvKWYijG6Rggo4m0xvDKj1m7ew00a8e26d3002508b828",

"V02Sr3nJ9IicoHWfeyQLiXgvrRpje6E00a240b890023270f97",

"V02SBsNOf4sJZNFo4jOHdgHg7-2Tn1s00a338776000b669579",

"V02ScVbtm2pQD49ArcgGLv360iqQFLs014c8062e000b6c37b6",

"V02S2oI49T-Jp0_zJKZ5U38dIUSIl8Q00aa679530026780e96",

"V02ShotJqqiWyubCX0VWTlcbgcHqtSQ00a45564e002678124c",

"V02SFiqdXRGnH5oAV2FmDDulZyGDL3M00a61660c0026781be1",

"V02S7tldy5ltYcikCzJ8PJQDSy_ElEs00a327c3c0026782526",

"V02SPoOluAnWda0dTBYTXpdetS97tyI00a16135e002684bb5c",

"V02Sb8gxW2inr6IDYrdHK_ywJnayd6s00ab7472b0026849b17",

"V02SwV15KQ_8n6brU98_2kLnnFUDUOw00adf3fda0026934a7f",

"V02SC1mOHS0RiUBxeoA8NTliH2h2NGc00a803c35002693584d"

]

for item in wps_inv:

sio.write("为{}邀请---↓\n\n".format(item['name']))

if type(item['invite_userid']) == int:

wps_invite(invite_sid, item['invite_userid'])

else:

sio.write("邀请失败:用户ID错误,请重新复制手机WPS个人信息中的用户ID并修改'invite_userid'项,注意不保留双引号\n\n")

desp = sio.getvalue()

pushWechat(desp, nowtime)

print(desp)

return desp

# wps接受邀请

def wps_invite(sid: list, invite_userid: int) -> None:

invite_url = 'http://zt.wps.cn/2018/clock_in/api/invite'

for index, i in enumerate(sid):

headers = {

'sid': i

}

time.sleep(10)

r = s.post(invite_url, headers=headers, data={

'invite_userid': invite_userid,

"client_code": "040ce6c23213494c8de9653e0074YX30",

"client": "alipay" })

def main_handler(event, context):

return main()

if __name__ == '__main__':

main()[/mw_shl_code]

2.多次触发

多次触发方法:

菜鸟版,创建触发器,定时触发,每小时触发一次

WPS云函数签到人数不够解决方法-自测已满10个-惠小助(52huixz.com)

升级版,创建触发器,定时触发,自定义触发,使用自定义函数。

例子:

0 0 10,14,16 * * * * 表示在每天上午10点,下午2点,4点触发

0 0 10,14,16,18 * * * * 表示在每天上午10点,下午2点,4点,6点触发

WPS云函数签到人数不够解决方法-自测已满10个-惠小助(52huixz.com)

文章标签:

微信公众号:赚客撸羊毛

最大线报网站