fwefwf
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user