import requests
import json
import time
def login():
session = requests.session()
url_get = '8c9K9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6^5K9h3q4G2j5X3g2A6i4K6u0W2P5h3W2F1k6$3S2#2j5h3!0F1L8r3W2F1k6g2)9J5k6h3y4G2L8g2)9J5c8Y4m8J5L8$3c8Q4x3X3c8S2M7r3W2Q4x3V1k6U0j5i4m8@1j5$3S2S2d9h3#2S2k6$3g2Q4x3U0M7`.
response = session.get(url_get)
uuid = response.json()['uuid']
showcode = response.json()['showCode']
url_post = 'e36K9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6^5K9h3q4G2j5X3g2A6i4K6u0W2P5h3W2F1k6$3S2#2j5h3!0F1L8r3W2F1k6g2)9J5k6h3y4G2L8g2)9J5c8Y4m8J5L8$3c8Q4x3X3c8S2M7r3W2Q4x3V1k6D9L8$3N6A6L8W2)9J5y4H3`.`.
data = {
"username": "",
"password": "",
"code": showcode,
"uuid": uuid
}
response = session.post(url=url_post, json=data)
token_xiaobei = response.json()['token']
url_tiwen = "1dfK9s2c8@1M7s2y4Q4x3@1q4Q4x3V1k6Q4x3V1k6^5K9h3q4G2j5X3g2A6i4K6u0W2P5h3W2F1k6$3S2#2j5h3!0F1L8r3W2F1k6g2)9J5k6h3y4G2L8g2)9J5c8Y4m8J5L8$3c8Q4x3X3c8S2M7r3W2Q4x3V1k6K6N6s2g2V1k6h3&6@1i4K6u0r3K9r3g2S2L8s2c8Z5"
headers = {
'user-agent': 'iPhone10,6(iOS/13.5.1) Uninview(Uninview/1.0.0) Weex/0.26.0 1125x2436',
'authorization': token_xiaobei,
'accept-encoding': 'gzip, deflate, br'
}
data = {
"temperature": "36.3",
"coordinates": "undefined-陕西省-西安市-雁塔区",
"location": "108.8814949544271,34.21714735243056",
"healthState": "1",
"dangerousRegion": "2",
"dangerousRegionRemark": "",
"contactSituation": "2",
"goOut": "1",
"goOutRemark": "",
"remark": "",
"familySituation": "1"
}
response = requests.post(url=url_tiwen, headers=headers, json=data)
print(response.text)
if __name__ == '__main__':
login()