From 2c9ea4db653e418559039bf45a2b33ebe62299b2 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 2 Dec 2025 16:18:04 +0800 Subject: [PATCH] fwefwf --- websea/main.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/websea/main.py b/websea/main.py index 198d762..4310f94 100644 --- a/websea/main.py +++ b/websea/main.py @@ -200,21 +200,6 @@ class WeexTransaction: self.mn_tab.ele('x://*[contains(text(), "市价")]', timeout=15).click() time.sleep(1) - html_text = self.remove_tags_and_spaces(html=self.mn_tab.html) - # 定义正则表达式模式,用于匹配包含逗号和小数点的数值 - pattern = r'可用:([\d,]+\.\d+)USDT' - - # 使用 re.search 方法查找匹配项 - match = re.search(pattern, html_text) - number = "" - if match: - # 提取匹配到的数值字符串 - number_str = match.group(1).replace(',', '') - # 将提取的字符串转换为浮点数 - number = float(number_str) - - if not number: - return self.mn_tab.ele('x://*[@id="amountInput"]').input(float(self.get_num()) / 100) time.sleep(1) @@ -311,7 +296,7 @@ class WeexTransaction: res = num_tab.listen.wait(timeout=15) # 等待并获取一个数据包 if res: - return res.response["result"]["availableUsd"] + return res.response.body["result"]["availableUsd"] except: pass @@ -359,8 +344,8 @@ class WeexTransaction: self.pbar.n = current_minute - 30 self.pbar.refresh() - # if current_minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34, ]: # 判断是否是 新的30分钟了 - if current_minute not in range(60): # 判断是否是 新的30分钟了 + if current_minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34, ]: # 判断是否是 新的30分钟了 + # if current_minute not in range(60): # 判断是否是 新的30分钟了 time.sleep(10) continue