diff --git a/dailycheckin_scripts/ck_2nzz.py b/dailycheckin_scripts/ck_2nzz.py index e2d50e0..e336a51 100644 --- a/dailycheckin_scripts/ck_2nzz.py +++ b/dailycheckin_scripts/ck_2nzz.py @@ -67,11 +67,10 @@ class WWW2NZZ: return msg -@check(run_script_name="小米运动",run_script_expression="WWW2NZZ") +@check(run_script_name="咔叽网单", run_script_expression="WWW2NZZ") def main(*args, **kwargs): return WWW2NZZ(check_item=kwargs.get("value")).main() if __name__ == "__main__": main() - diff --git a/other_scripts/oc_163game.py b/other_scripts/oc_163game.py new file mode 100644 index 0000000..47010f7 --- /dev/null +++ b/other_scripts/oc_163game.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +""" +cron: 20 8 * * * +new Env('网易云游戏'); +""" + +from utils import check +import requests + + +class Game163: + def __init__(self, check_items): + self.check_items = check_items + + @staticmethod + def checkin(authorization): + url = "http://n.cg.163.com/api/v2/sign-today" + headers = { + "user-agent": "Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/85.0.4183.127 Mobile Safari/537.36", + "authorization": authorization, + } + r = requests.post(url, headers=headers).text + if r[0] == "{": + return "cookie 已失效" + else: + return "签到成功" + + def main(self): + msg_all = "" + for check_item in self.check_items: + authorization = str(check_item.get("authorization")) + msg = self.checkin(authorization=authorization) + msg_all += msg + "\n\n" + return msg_all + + +@check(run_script_name="网易云游戏", run_script_expression="GAME163") +def main(*args, **kwargs): + return Game163(check_items=kwargs.get("value")).main() + + +if __name__ == "__main__": + main()