Skip to content

Instantly share code, notes, and snippets.

@isombyt
Created January 30, 2021 01:30
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save isombyt/6570c116416654cf905b72c75c59c9b7 to your computer and use it in GitHub Desktop.
Save isombyt/6570c116416654cf905b72c75c59c9b7 to your computer and use it in GitHub Desktop.
无忧行
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