-
-
Save isombyt/6570c116416654cf905b72c75c59c9b7 to your computer and use it in GitHub Desktop.
无忧行
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class JegoTrip(): | |
user_id: str | |
def __init__(self, user_id: str): | |
self.user_id = user_id | |
def tasks(self): | |
resp = requests.get('http://task.jegotrip.com.cn:8080/app/tasks?userid=%s' % self.user_id) | |
data = resp.json() | |
return data['rtn']['tasks'] | |
def sign(self, task_id: str) -> bool: | |
resp = requests.post('http://task.jegotrip.com.cn:8080/app/sign', json={ | |
'userid': self.user_id, | |
'taskId': task_id | |
}) | |
data = resp.json() | |
return data['result'] | |
if __name__ == '__main__': | |
cli = JegoTrip(抓包得到USER_ID) | |
for task in cli.tasks().get('日常任务', []): | |
if task['name'] != '每日签到奖励': | |
continue | |
if task['triggerAction'] == '签到': | |
print('签到', cli.sign(task['id'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment