From 2726dfefddb44df402d3e66419a410605738f8dd Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 12 Dec 2025 17:40:00 +0800 Subject: [PATCH] fwefwf --- telegram/8619211027341.session | Bin 45056 -> 45056 bytes 交易/bitmart_优化版.py | 6 +++--- 交易/websea_交易.py | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/telegram/8619211027341.session b/telegram/8619211027341.session index 09cc9f186fb1ebaaa8bf8cc164bd193e62762105..a70ae11ad57bcd9c6a8fe9103d991d91c0af33bc 100644 GIT binary patch delta 66 zcmZp8z|`=7X@V4!2MVv(UHv)OO&jE{K;F_djkM@932w? delta 66 zcmZp8z|`=7X@V4!@c)T2PC#;F!qQyMUyir@zNMe9oHdy*PnqfF+|9;$Cs>$n&fEOA WXc8mS&H0-rmMB>R`IEP<_XYsoR34T9 diff --git a/交易/bitmart_优化版.py b/交易/bitmart_优化版.py index 37cd4dc..6969522 100644 --- a/交易/bitmart_优化版.py +++ b/交易/bitmart_优化版.py @@ -115,12 +115,12 @@ class WeexTransaction: def get_token(self): """从浏览器监听接口中提取 token 和 cookies""" tab = self.page.new_tab() - tab.listen.start("userPositions") + tab.listen.start("contract-tiger/forward/v1/ifcontract/shareguide/status") for _ in range(3): try: tab.get("https://derivatives.bitmart.com/zh-CN/futures/ETHUSDT") - res = tab.listen.wait(5) + res = tab.listen.wait(timeout=5) # 请求头 + Cookies self.session.headers.update(res.request.headers) @@ -318,7 +318,7 @@ class WeexTransaction: self.pbar.refresh() # 必须是整点或半点及前 5 分钟 - if minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34]: + if minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34,35]: time.sleep(8) continue diff --git a/交易/websea_交易.py b/交易/websea_交易.py index f244075..c44481c 100644 --- a/交易/websea_交易.py +++ b/交易/websea_交易.py @@ -339,9 +339,10 @@ class WeexTransaction: time.sleep(10) continue - # 判断抓取的数据是否正确 - if self.get_now_time() != self.kline_3["id"]: - continue + if self.kline_3: + # 判断抓取的数据是否正确 + if self.get_now_time() != self.kline_3["id"]: + continue new_price_datas = self.get_price() if not new_price_datas: