rgfewfger
This commit is contained in:
22
推特/main.py
22
推特/main.py
@@ -22,7 +22,7 @@ class Hub_Web:
|
||||
self.page = None
|
||||
self.x_tab = None
|
||||
|
||||
# self.start() # 执行类时,就启动的方法
|
||||
self.start() # 执行类时,就启动的方法
|
||||
|
||||
def start(self):
|
||||
|
||||
@@ -489,6 +489,9 @@ class Hub_Web:
|
||||
time.sleep(random.randint(1, 10))
|
||||
self.page.scroll(random.randint(500, 1000))
|
||||
|
||||
if random.randint(1, 11) > 5:
|
||||
self.FollowTwitterAccount()
|
||||
|
||||
def get_name(self):
|
||||
self.x_tab = self.page.new_tab('https://x.com/login')
|
||||
|
||||
@@ -545,6 +548,20 @@ class Hub_Web:
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
self.end()
|
||||
|
||||
def FollowTwitterAccount(self):
|
||||
|
||||
# 点击关注
|
||||
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))
|
||||
|
||||
# def action(self):
|
||||
|
||||
|
||||
@@ -657,7 +674,8 @@ def run_work(x_token_info, xstart_info):
|
||||
# executor.submit(hun_web.to_do_tui)
|
||||
|
||||
with Hub_Web(x_info=x_token_info, xstart_info=xstart_info) as hub:
|
||||
hub.to_do_tui() # 发推
|
||||
# hub.to_do_tui() # 发推
|
||||
hub.account_nurturing() # 发推
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user