You've already forked XiguaLiveDanmakuHelper
							
							修复因西瓜直播搜索接口修改导致的无法获取直播用户的问题
This commit is contained in:
		
							
								
								
									
										10
									
								
								WinMain.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								WinMain.py
									
									
									
									
									
								
							| @@ -185,10 +185,14 @@ if __name__ == "__main__": | |||||||
|     else: |     else: | ||||||
|         name = readInput("请输入主播用户名,默认为", name, 3) |         name = readInput("请输入主播用户名,默认为", name, 3) | ||||||
|     api = WinMain(name) |     api = WinMain(name) | ||||||
|     print("进入", api.roomLiver, "的直播间") |     while not api.isValidRoom: | ||||||
|     if not api.isValidRoom: |         set_cmd_text_color(FOREGROUND_RED) | ||||||
|         input("房间不存在") |         print("未找到对应房间或未开播,等待1分钟后重试") | ||||||
|  |         resetColor() | ||||||
|  |         time.sleep(60) | ||||||
|  |         api.updRoomInfo() | ||||||
|         sys.exit() |         sys.exit() | ||||||
|  |     print("进入", api.roomLiver, "的直播间") | ||||||
|     os.system("title {}".format(api.getTitle())) |     os.system("title {}".format(api.getTitle())) | ||||||
|     print("=" * 30) |     print("=" * 30) | ||||||
|     while True: |     while True: | ||||||
|   | |||||||
| @@ -107,14 +107,16 @@ def upload(date=datetime.strftime(datetime.now(), "%Y_%m_%d")): | |||||||
| b = Bilibili() | b = Bilibili() | ||||||
| b.login(Common.config["b_u"], Common.config["b_p"]) | b.login(Common.config["b_u"], Common.config["b_p"]) | ||||||
|  |  | ||||||
|  |  | ||||||
| def run(): |  | ||||||
|     global isEncode, isDownload |  | ||||||
| et = threading.Thread(target=encode, args=()) | et = threading.Thread(target=encode, args=()) | ||||||
| et.setDaemon(True) | et.setDaemon(True) | ||||||
| et.start() | et.start() | ||||||
|  |  | ||||||
|  |  | ||||||
|  | def run(): | ||||||
|  |     global isEncode, isDownload | ||||||
|  |     Common.refreshDownloader() | ||||||
|     if not Common.api.isValidRoom: |     if not Common.api.isValidRoom: | ||||||
|         Common.appendError("[{}]房间不存在".format(Common.config["l_u"])) |         Common.appendError("[{}]房间未找到".format(Common.config["l_u"])) | ||||||
|         return |         return | ||||||
|     d = None |     d = None | ||||||
|     t = threading.Thread(target=download) |     t = threading.Thread(target=download) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user