diff --git a/core/fay_core.py b/core/fay_core.py index 781f8de..e2c7378 100644 --- a/core/fay_core.py +++ b/core/fay_core.py @@ -281,20 +281,6 @@ def __auto_speak(self): amount = interact.data["gifts"][i]["amount"] msg += "{}送给我的{}个{}".format(user, amount, gift[1]) self.a_msg = '感谢感谢,感谢' + msg - - # elif index == 5: - # msg = "" - # for index in range(1, len(interact), 4): - # try: - # gift = interact[index + 2] - # gift_name = '礼物' - # if gift[0] != -1: - # gift_name = gift[1] - # msg = msg + "{}送给我的{}个{},".format(interact[index], interact[index + 3], gift_name) - # except BaseException as e: - # print("[System] 礼物处理错误!") - # print(e) - # self.a_msg = '感谢感谢,感谢' + msg self.last_speak_data = self.a_msg self.speaking = True MyThread(target=self.__say, args=['interact']).start() diff --git a/core/viewer.py b/core/viewer.py index 33e06d4..7258bf1 100644 --- a/core/viewer.py +++ b/core/viewer.py @@ -41,17 +41,17 @@ def __init__(self, url): def __start(self): MyThread(target=self.__driver_alive_runnable).start() self.chrome_options = Options() - self.chrome_options.add_argument('--headless') - self.chrome_options.add_argument('--blink-settings=imagesEnabled=false') + # self.chrome_options.add_argument('--headless') + # self.chrome_options.add_argument('--blink-settings=imagesEnabled=false') self.live_driver = webdriver.Chrome(config_util.system_chrome_driver, options=self.chrome_options) self.live_driver.get(self.url) - self.user_driver = webdriver.Chrome(config_util.system_chrome_driver, options=self.chrome_options) + # self.user_driver = webdriver.Chrome(config_util.system_chrome_driver, options=self.chrome_options)#抖音加了验证码,暂时不获取粉丝数 self.__wait_live_start() self.user_sec_uid = self.__get_render_data(self.live_driver)['app']['initialState']['roomStore']['roomInfo']['room']['owner']['sec_uid'] MyThread(target=self.__live_state_runnable).start() MyThread(target=self.__join_runnable).start() MyThread(target=self.__interact_runnable).start() - MyThread(target=self.__follower_runnable).start() + # MyThread(target=self.__follower_runnable).start() #抖音加了验证码,暂时不获取粉丝数 def start(self): MyThread(target=self.__start).start() diff --git a/gui/static/js/index.js b/gui/static/js/index.js index 9ef4c44..cf212d2 100644 --- a/gui/static/js/index.js +++ b/gui/static/js/index.js @@ -183,9 +183,9 @@ new Vue({ //Edit by xszyou in 2022/2/3:同步到看板娘 text = panelMsg; - if (panelMsg != ""){ + const tips = document.getElementById("waifu-tips"); + if (panelMsg != "" && tips != null){ sessionStorage.setItem("waifu-text", 8); - const tips = document.getElementById("waifu-tips"); tips.innerHTML = text; tips.classList.add("waifu-tips-active"); messageTimer = setTimeout(() => {