This commit is contained in:
Administrator
2025-12-03 18:27:09 +08:00
parent 106612b6a7
commit 9ab4097130
2 changed files with 12 additions and 8 deletions

View File

@@ -164,7 +164,7 @@ class WeexTransaction:
try:
logger.info(f"获取最新数据:{i + 1}次。。。")
self.mn_tab.get(url="https://www.websea.com/zh-CN/futures/ETH-USDT")
res = self.mn_tab.listen.wait(timeout=15) # 等待并获取一个数据包
res = self.mn_tab.listen.wait(timeout=25) # 等待并获取一个数据包
datas = []
if res:
@@ -326,7 +326,7 @@ class WeexTransaction:
logger.info('关闭多余标签页失败!!!')
self.mn_tab = self.page.new_tab()
self.mn_tab.listen.start("https://capi.websea.com/webApi/market/getKline")
self.mn_tab.listen.start("capi.websea.com/webApi/market/getKline")
logger.success("浏览器开启抓包模式。。。")
self.mn_tab.get(url="https://www.websea.com/zh-CN/futures/ETH-USDT") # 打开网页

View File

@@ -511,13 +511,17 @@ class Hub_Web:
# except Exception as e:
# print(e)
tab = self.page.new_tab(url="https://x.com/Websea_MY")
tab = self.page.new_tab(url="https://x.com/CryptoStart_App")
time.sleep(10)
ele = tab.ele('x://span[text()="Follow"]', timeout=0.5)
if ele:
tab.actions.click(on_ele=ele)
time.sleep(10)
for i in range(random.randint(1, 10)):
tab.actions.scroll(delta_y=random.randint(400, 800))
time.sleep(random.randint(3, 10))
self.page.quit()
@@ -530,14 +534,14 @@ if __name__ == '__main__':
bit_id=bit_data["id"],
)
if xstart_info.x_id:
continue
# continue
hun_web = Hub_Web(xstart_info=xstart_info)
hun_web = Hub_Web(xstart_info=xstart_info)
# hun_web.action()
# hun_web.action()
threading.Thread(target=hun_web.action).start()
time.sleep(15)
threading.Thread(target=hun_web.action).start()
time.sleep(random.randint(15, 60))
# # 同时运行
# max_threads = 1