Giter Club home page Giter Club logo

unicom-task's Introduction

功能

  • 沃之树领流量、浇水(12M日流量)
  • 每日签到(1积分+翻倍4积分+第七天1G流量日包)
  • 天天抽奖,每天三次免费机会(随机奖励)
  • 游戏中心每日打卡(连续打卡,积分递增至最高7,第七天1G流量日包)
  • 每日领取100定向积分
  • 积分抽奖,每天最多抽30次(中奖几率渺茫)
  • 冬奥积分活动(第1和7天,可领取600定向积分,其余领取300定向积分,有效期至下月底)
  • 获取每日1G流量日包(截止日期暂时不知道)
  • 增加沃邮箱签到,连续签到可获得话费奖励(需绑定沃邮箱公众号)
  • 邮件、钉钉、Tg、企业微信等推送运行结果

使用方法

docker

在当前文件夹创建config.json,用于存储账户信息。

#步骤1
docker run -itd \
  -v $PWD/config.json:/root/config.json \
  --name unicom-task \
  --restart always \
  srcrs/unicom-task
#步骤2
docker exec unicom-task /bin/bash -c 'service cron start'

docker-compose

更改unicom-task/config/config.json

docker-compose up -d

完成上述操作后,容器中每天会自动跑两个脚本,一个会在6:30的时候自动执行任务,一个会在5:00自动更新最新代码。

腾讯云函数

已经对云函数有过了解,并且已在腾讯云开通过云函数功能。

通过yaml文件

需要本地具备npm环境

  • git clone https://github.com/srcrs/unicom-task.git

  • npm install -g serverless

  • cd ./UnicomTask-docker/serverless/tencent-scf

  • sls deploy --debug

  • 微信扫码登陆

  • 进入到unicom-Task容器中,在config.json填写账号信息,点击测试,手动运行一次,如果能够正常运行就说明部署成功。

通过zip包

  1. releases下载最新的unicomtask-tenscf.zip包

  2. 进入 创建自定义云函数

  3. 必要配置

  • (1) 函数代码 --> 选择本地上传zip包 --> 上传unicomtask-tenscf.zip
  • (2) 高级配置 --> 环境配置 --> 执行超时时间设置为 900
  • (3) 触发器配置 --> 自定义创建 --> 触发周期 --> 自定义出发周期 --> Cron表达式 --> 0 30 6 * * * *
  1. 点击完成。最后,进入到刚才创建的云函数,找到config.json填写账号信息,点击测试,手动运行一次,如果能够正常运行就说明部署成功。

注:最后一步在config.json填写账号信息,也可以先把unicomtask-tenscf.zip解压,待config.json信息完善后,再进行压缩。就不用在第4步完善测试了。

通过脚本一键部署

需要本地具备 npm 环境

  • Clone 本项目 git clone https://github.com/srcrs/unicom-task.git
  • 进入该项目 cd unicom-task
  • 修改 config 文件夹中的 config.conf 为你的账号信息
[
    {
        "username": "1390000000",
        "password": "000000",
        "appId": "00000000000000000"
    },
    {
        "username": "13333333333",
        "password": "000000",
        "appId": "00000000000000000"
    }
]
  • 赋予脚本可执行权限 chmod +x ./serverless/local_deploy.sh
  • 运行脚本 ./serverless/local_deploy.sh
  • 扫码或网页登录腾讯云
  • 完成部署

unicom-task's People

Contributors

dellear avatar jone2008 avatar lhx11187 avatar maxxwall avatar saxon-sun avatar srcrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unicom-task's Issues

请使用短信验证码登录进行身份验证!

云函数测试提醒需要短信验证码

【登录】: 尊敬的客户您好,请使用短信验证码登录进行身份验证!

[2021-09-25 12:13:06,390]:INFO:【登录】: 尊敬的客户您好,请使用短信验证码登录进行身份验证!

测试报错

START RequestId:130d6263-fbac-4bf1-9903-2e689f6a9881
ERROR RequestId:130d6263-fbac-4bf1-9903-2e689f6a9881 Result:{"errorCode":-1,"errorMessage":"Traceback (most recent call last):\n File "/var/runtime/python3/bootstrap.py", line 133, in init_handler\n func_handler = get_func_handler(file.rsplit(".", 1)[0], func)\n File "/var/runtime/python3/bootstrap.py", line 159, in get_func_handler\n mod = imp.load_module(mname, *imp.find_module(mname))\n File "/var/lang/python3/lib/python3.6/imp.py", line 234, in load_module\n return load_source(name, filename, file)\n File "/var/lang/python3/lib/python3.6/imp.py", line 172, in load_source\n module = _load(spec)\n File "\u003cfrozen importlib._bootstrap\u003e", line 675, in _load\n File "\u003cfrozen importlib._bootstrap\u003e", line 655, in _load_unlocked\n File "\u003cfrozen importlib._bootstrap_external\u003e", line 678, in exec_module\n File "\u003cfrozen importlib._bootstrap\u003e", line 205, in _call_with_frames_removed\n File "/var/user/index.py", line 1, in \u003cmodule\u003e\n import requests,json,time,re,login,logging,traceback,os,random,notify,datetime,util\n File "/var/user/login.py", line 6, in \u003cmodule\u003e\n import base64,rsa,time,requests,logging,traceback,os\nModuleNotFoundError: No module named 'rsa'","statusCode":443}
END RequestId:130d6263-fbac-4bf1-9903-2e689f6a9881
Report RequestId:130d6263-fbac-4bf1-9903-2e689f6a9881 Duration:0ms Memory:128MB MemUsage:0.000000MB

docker保姆教程

#dock主要解决新版本找不到config.json的问题

#步骤1

进入你的SHH

#步骤2:进入你Linux的root目录

cd /root

#步骤3:运行大佬的代码(去大佬页面复制去)

#步骤(1)
docker run -itd \                             #这句的意思docker运行,--itd是交互、输入、后台运行
  -v $PWD/config.json:/root/config.json \      #这就的意思在当前目录(Linux中真实目录)与docker中容器目录中的root/config.json 做个链接。目的是为了方便大家好修改,不用每次都进入容器中修改。
  --name unicom-task \                            #这句意思不太懂,猜测应该是为上面那句确定位置。
  --restart always \                             #重启镜像。
  srcrs/unicom-task                            #这句意思拉取github中名字为unicom-task的镜像。
#步骤(2)
docker exec unicom-task /bin/bash -c 'service cron start'     #这就就是启动容器中unicom-task下的cron进程

#步骤4:更改unicom-task/config/config.json(很多人卡到这里,其实是因为你的docker没安装compose,自行搜索一下吧。关键词:docker-compose安装+你的系统名称,切记安装compose的时候要退出容器,命令是exit)

docker-compose up -d      #这句话的意思是compose以守护进程模式运行加-d选项,我也不懂,具体去那个文件夹下使用。

#步骤5:使用WinSCP登录到目录:root 新建config.json文件并写入自己的信息。
image

#步骤6:进入容器

docker exec -it unicom-task bash
#进入root目录
cd
#显示文件,确定有是否有start.sh	
dir
#运行start.sh
./start.sh

目前我就研究会这么多,见谅。欢迎大佬们带带我们菜鸟

bark配置无法使用

大佬您好,使用中有2个问题。bark的配置是不是每个账号都要填写?
配置了bark,但没有通知。有如下报错。
Traceback (most recent call last):
File "/UnicomTask/index.py", line 68, in
main_handler("","")
File "/UnicomTask/index.py", line 64, in main_handler
sendNotice(user)
File "/UnicomTask/index.py", line 50, in sendNotice
notify.sendBark(user['Bark'])
File "/UnicomTask/notify.py", line 237, in sendBark
state=json.loads(resp.text)
File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

mailwoCookies的参数问题

"mailwoCookies": "沃邮箱cookie(选填,不填请删除此行,club.mail.wo.cn.py使用)",
敢问大佬这个参数具体抓哪个url(或者哪一类host的包)
个人尝试黄鸟抓取host为club.mail.wo.cn下的ck(ck里仅SESSION一项) 例SESSION=d6d4-87c0-4-88e5-a8c*****53bd 失败

在n1里面部署docker出错

启动docker出错,提示
Containers: start 7e71f54f842cfbea7f5af878a6a69f25bf19bf5bc0f912cb97a807aac3b39daf...code:304 Not Modified
是什么情况,

日志在哪里看呢?

中午配置的,假如服务器崩溃了没有执行到,手动执行一次的话怎么操作?

【游戏中心签到】: 错误,原因为: Expecting value: line 1 column 1 (char 0)

[2021-08-18 10:54:33,154]:INFO:【登录】: 0251
[2021-08-18 10:54:34,931]:INFO:【通信积分】: 238
[2021-08-18 10:54:34,932]:INFO:【奖励积分】: 177
[2021-08-18 10:54:34,932]:INFO:【定向积分】: 9800
[2021-08-18 10:54:34,932]:INFO:【优惠券】: 0
[2021-08-18 10:54:39,255]:INFO:【即将过期流量包】: 暂无
[2021-08-18 10:54:40,781]:INFO:【沃之树-领流量新】: 4M流量 x1
[2021-08-18 10:54:43,492]:INFO:【沃之树-领流量】: 4M流量 x3
[2021-08-18 10:54:45,926]:INFO:【沃之树-领流量】: 4M流量 x5
[2021-08-18 10:54:48,420]:INFO:【沃之树-领流量】: 4M流量 x7
[2021-08-18 10:54:50,128]:INFO:【沃之树-浇水】: 获得0培养值
[2021-08-18 10:54:56,097]:INFO:【每日签到】: 您今天已经签到啦
Traceback (most recent call last):
File "/root/unicom-task/task/game_signin.py", line 34, in run
res1 = gameCenter.json()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.9/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[2021-08-18 10:55:35,309]:ERROR:【游戏中心签到】: 错误,原因为: Expecting value: line 1 column 1 (char 0)

望修复,谢

云函数报错

日志:

START RequestId:6980dbf3-c23d-4000-a813-00b6863e6814

ERROR RequestId:6980dbf3-c23d-4000-a813-00b6863e6814 Result:{"errorCode":-1,"errorMessage":"Traceback (most recent call last):\n File "/var/runtime/python3/bootstrap.py", line 133, in init_handler\n func_handler = get_func_handler(file.rsplit(".", 1)[0], func)\n File "/var/runtime/python3/bootstrap.py", line 159, in get_func_handler\n mod = imp.load_module(mname, *imp.find_module(mname))\n File "/var/lang/python3/lib/python3.6/imp.py", line 234, in load_module\n return load_source(name, filename, file)\n File "/var/lang/python3/lib/python3.6/imp.py", line 172, in load_source\n module = _load(spec)\n File "\u003cfrozen importlib._bootstrap\u003e", line 675, in _load\n File "\u003cfrozen importlib._bootstrap\u003e", line 655, in _load_unlocked\n File "\u003cfrozen importlib._bootstrap_external\u003e", line 678, in exec_module\n File "\u003cfrozen importlib._bootstrap\u003e", line 205, in _call_with_frames_removed\n File "/var/user/index.py", line 1, in \u003cmodule\u003e\n import requests,json,time,re,login,logging,traceback,os,random,notify,datetime,util\n File "/var/user/login.py", line 6, in \u003cmodule\u003e\n import base64,rsa,time,requests,logging,traceback,os\nModuleNotFoundError: No module named 'rsa'","statusCode":443}

END RequestId:6980dbf3-c23d-4000-a813-00b6863e6814

Report RequestId:6980dbf3-c23d-4000-a813-00b6863e6814 Duration:0ms Memory:128MB MemUsage:0.000000MB

发现只要加推送和邮箱就不正常

Traceback (most recent call last):
File "index.py", line 14, in readJson
users = json.load(fp)
File "/usr/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 7 column 9 (char 326)

[2021-09-29 13:41:45,577]:ERROR:账号信息获取失败错误,原因为: Expecting ',' delimiter: line 7 column 9 (char 326)
[2021-09-29 13:41:45,577]:ERROR:1.请检查是否在Secrets添加了账号信息,以及添加的位置是否正确。
[2021-09-29 13:41:45,578]:ERROR:2.填写之前,是否在网站验证过Json格式的正确性。
Traceback (most recent call last):
File "index.py", line 68, in
main_handler("","")
File "index.py", line 55, in main_handler
for user in users:
TypeError: 'NoneType' object is not iterable

[天天抽奖]:错误,原因为:'Rsptype'

Traceback (most recent call last):

  File "/var/user/index.py", line 114, in luckDraw_task

    if res['Rsptype'] == '6666':

KeyError: 'Rsptype'

我在config.json中删掉了一行

 "lotteryNum": "抽奖次数(选填,不填请删除此行)",

不知道是不是这一行导致的

部署云函数运行出错

{"errorCode":-1,"errorMessage":"Traceback (most recent call last):\n  File \"/var/runtime/python3/bootstrap.py\", line 133, in init_handler\n    func_handler = get_func_handler(file.rsplit(\".\", 1)[0], func)\n  File \"/var/runtime/python3/bootstrap.py\", line 160, in get_func_handler\n    return getattr(mod, fname)\nAttributeError: module 'index' has no attribute 'main'","statusCode":443}

【游戏频道打卡】可能会出现校验不通过

【东奥积分活动】: 领取成功,300积分   
【游戏中心签到】: 恭喜您获得2积分   
【游戏频道打卡】: 积分领取接口:防刷策略接口校验不通过  
【沃之树-领流量】: 4M流量 x2   
【沃之树-领流量】: 4M流量 x4   
【沃之树-领流量】: 4M流量 x6   
【沃之树-领流量】: 4M流量 x8   
【沃之树-浇水】: 获得3培养值

怎么执行呀?

我倒是部署成功了,但是没有自动运行过,推送也没推送过

docker

1、docker能详细点吗?有点看不懂。
2、编辑 unicom-task/config/config.json乱码了。
3、怎么多账号使用?
谢谢老板解惑

账号信息获取失败

虽然知道问题代码,但还是不知道怎么去改。。。docker部署的,都是根据主页代码进行的。。。有大佬能看看怎么解决吗?
错误如下:
ERROR:账号信息获取失败错误,原因为: Expecting property name enclosed in double quotes: line 8 column 9 (char 290)
[2021-07-22 06:30:11,134]:ERROR:1.请检查是否在Secrets添加了账号信息,以及添加的位置是否正确。
[2021-07-22 06:30:11,134]:ERROR:2.填写之前,是否在网站验证过Json格式的正确性。
Traceback (most recent call last):
File "/root/UnicomTask-docker/index.py", line 241, in readJson
users = json.load(fp)
File "/usr/local/lib/python3.9/json/init.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 8 column 9 (char 290)

Traceback (most recent call last):
File "/root/UnicomTask-docker/index.py", line 462, in
main_handler("","")
File "/root/UnicomTask-docker/index.py", line 422, in main_handler
for user in users:
TypeError: 'NoneType' object is not iterable

帮助信息太简略了

这README.md也太简略了,一点也不友好。
小白docker和腾讯云函数完全都没任何知识。
我就想问如何安卓手机直接使用(通过termux运行)
某些不想要的任务(流量,游戏和过期的任务)如何关闭,其中如果只运行邮箱email_task.py又该怎么整

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.