diff --git a/telegram/8619211027341.session b/telegram/8619211027341.session index 09cc9f1..a70ae11 100644 Binary files a/telegram/8619211027341.session and b/telegram/8619211027341.session differ 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: