if hostname in user_map: user_id_1 = user_map[hostname]["user_id_1"] user_id_2 = user_map[hostname]["user_id_2"] user_id_3 = user_map[hostname]["user_id_3"] user_id_4 = user_map[hostname]["user_id_4"] else: print("ERROR: %s does not map to a valid user ID" % hostname) sys.exit(1) options = common.setup_chrome() driver1 = common.make_driver(options) driver2 = common.make_driver(options) driver3 = common.make_driver(options) driver4 = common.make_driver(options) main_room_url_1 = common.make_main_room_url(user_id_1, data) main_room_url_2 = common.make_main_room_url(user_id_2, data) main_room_url_3 = common.make_main_room_url(user_id_3, data) main_room_url_4 = common.make_main_room_url(user_id_4, data) try: common.shape_traffic(hostname) driver1.get(main_room_url_1) driver2.get(main_room_url_2) driver3.get(main_room_url_3) driver4.get(main_room_url_4) common.wait_for_main_room_mute(driver1) common.wait_for_main_room_mute(driver2) common.wait_for_main_room_mute(driver3) common.wait_for_main_room_mute(driver4)
print("No driver instance to close") common.setup_signal_handlers(exit_callback) hostname = common.hostname_slug() user_id = None if hostname in user_map: user_id = user_map[hostname]["user_id_1"] else: print("ERROR: %s does not map to a valid user ID" % hostname) sys.exit(1) options = common.setup_chrome() driver = common.make_driver(options) main_room_url = common.make_main_room_url(user_id, data) try: common.shape_traffic(hostname) driver.get(main_room_url) while True: if not common.global_pause: common.manage_main_room(driver, True) common.manage_breakout(driver, session_map[hostname]["join_number"], session_map[hostname]["mute"]) time.sleep(config.page_wait_time) except WebDriverException as e: common.clear_traffic_shaping() print("ERROR: Webdriver error: %s" % e) # Wait for SIGINT.