# from Utils.Requester import Requester # # # # 获取主播的名称 # anchor_name = "123" # # anchorWithSession = {} # # # while True: # # 向ai发送信息 # last_msg_text = input("请输入:") # # # if anchor_name not in anchorWithSession: # # 如果是第一次发消息(没有sessionId的情况) # response = Requester.chatToAi({"msg": last_msg_text}) # aiResult = response['result'] # sessionId = response['session_id'] # # anchorWithSession[anchor_name] = sessionId # # 找到输入框,输入ai返回出来的消息 # print(aiResult) # # else: # # 如果不是第一次发消息(证明存储的有sessionId) # sessionId = anchorWithSession[anchor_name] # response = Requester.chatToAi({"msg": last_msg_text, "sid": sessionId}) # aiResult = response['result'] # print(aiResult) import datetime import wda udid = "e5ab9d3c548302dca3b1383589ac43eedd41f24e" client = wda.USBClient(udid) session = client.session() session.appium_settings({"snapshotMaxDepth": 15}) print(session.source())