Commit b3b2b2f5 by mac

注入localStorage方法登陆

parent 0c59b700
...@@ -103,7 +103,7 @@ def get_token(user): ...@@ -103,7 +103,7 @@ def get_token(user):
# 创建一个直播课,返回课程id和课程名称 # 创建一个直播课,返回课程id和课程名称
def create_a_live(start_time, start_time2=None, user="lgw-b"): def create_a_live(start_time, start_time2=None, user="lgw-b"):
xmtoken = get_token(user=user) xmtoken = get_token(user=user)["xmToken"]
basic_imforation = readConfig.test_header(header_name=user) basic_imforation = readConfig.test_header(header_name=user)
userId = basic_imforation['userId'] userId = basic_imforation['userId']
storeId = basic_imforation['storeId'] storeId = basic_imforation['storeId']
...@@ -112,7 +112,7 @@ def create_a_live(start_time, start_time2=None, user="lgw-b"): ...@@ -112,7 +112,7 @@ def create_a_live(start_time, start_time2=None, user="lgw-b"):
while xmtoken == "登录过频繁": while xmtoken == "登录过频繁":
# 休息15s是因为可能会登录频繁 # 休息15s是因为可能会登录频繁
time.sleep(15) time.sleep(15)
xmtoken = get_token() xmtoken = get_token()["xmToken"]
print(xmtoken) print(xmtoken)
dt = year_to_day() + ' 00:00:00' dt = year_to_day() + ' 00:00:00'
calendarTime = int(time.mktime(time.strptime(dt, "%Y-%m-%d %H:%M:%S")))*1000 calendarTime = int(time.mktime(time.strptime(dt, "%Y-%m-%d %H:%M:%S")))*1000
......
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