import json

import requests


base_url = 'http://dvema.com'
username='13800138001'
password='ansjer123456'

login_url = base_url + 'account/login'

data = {
    'userName': username,
    'userPwd': password
}
res = requests.post(url=login_url, data=data)
res = res.json()
print(res)

if res['result_code'] == 0:
    statistics_url = base_url + 'statistcs/pushDay'
    data = {
        'token': res['result']['access_token']
    }
    res = requests.post(url=statistics_url, data=data)
    print(res.json())

