Browse Source

网易云游戏

pull/15/head
yuxian 3 years ago
parent
commit
dbbb03a0ab
  1. 3
      dailycheckin_scripts/ck_2nzz.py
  2. 43
      other_scripts/oc_163game.py

3
dailycheckin_scripts/ck_2nzz.py

@ -67,11 +67,10 @@ class WWW2NZZ: @@ -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()

43
other_scripts/oc_163game.py

@ -0,0 +1,43 @@ @@ -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()
Loading…
Cancel
Save