Commit 335668d8 by mac

review

parent 57369b89
......@@ -100,12 +100,12 @@ def get_token(user, Terminal = 'SOW-B'):
return r.json()["message"]
return xmtoken
elif Terminal == 'SOW-C':
enterpeise_id = readConfig.test_header(user)['enterpriseId']
enterprise_id = readConfig.test_header(user)['enterpriseId']
user_id = readConfig.test_header(user)['userId']
headers = {"Content-Type": "application/json; charset=UTF-8",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/91.0.4472.77 Safari/537.36"}
params = {"enterpriseId": enterpeise_id, "userId": user_id, "appTermEnum": "XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN"}
params = {"enterpriseId": enterprise_id, "userId": user_id, "appTermEnum": "XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN"}
data = json.dumps(params)
url = "https://gateway.xiaomai5.com/hades/anon/hades/getWXWorkLoginNoCheck"
r = requests.post(url=url, data=data, headers=headers)
......@@ -120,11 +120,11 @@ def get_token(user, Terminal = 'SOW-B'):
# 创建一个直播课,返回课程id和课程名称
def create_a_live(start_time, start_time2=None, user="lgw-b"):
xmtoken = get_token(user=user, Terminal='SOW-B')["xmToken"]
basic_imforation = readConfig.test_header(header_name=user)
userId = basic_imforation['userId']
storeId = basic_imforation['storeId']
storeUserId = basic_imforation['storeUserId']
enterpriseId = basic_imforation['enterpriseId']
basic_information = readConfig.test_header(header_name=user)
userId = basic_information['userId']
storeId = basic_information['storeId']
storeUserId = basic_information['storeUserId']
enterpriseId = basic_information['enterpriseId']
while xmtoken == "登录过频繁":
# 休息15s是因为可能会登录频繁
time.sleep(15)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment