rgfewfger
This commit is contained in:
Binary file not shown.
43
推特/main.py
43
推特/main.py
@@ -7,7 +7,7 @@ from concurrent.futures import ThreadPoolExecutor
|
||||
from DrissionPage import ChromiumOptions, ChromiumPage
|
||||
from peewee import fn
|
||||
|
||||
from bit_tools import openBrowser, createBrowser, get_group_lists
|
||||
from bit_tools import openBrowser, createBrowser, get_group_lists, get_browser_lists_Browser
|
||||
from models.ips import Ips
|
||||
from models.xstart import Xstart
|
||||
from models.xtoken import XToken
|
||||
@@ -490,28 +490,31 @@ class Hub_Web:
|
||||
# except Exception as e:
|
||||
# print(e)
|
||||
|
||||
|
||||
self.page.quit()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
fz_datas = get_group_lists()
|
||||
|
||||
# 同时运行
|
||||
max_threads = 1
|
||||
delay_between_start = 15 # 每次启动线程之间的延迟时间(秒)
|
||||
for i in get_browser_lists_Browser(id=fz_datas['推特']):
|
||||
print(i)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=max_threads) as executor:
|
||||
|
||||
for x_token_info in XToken.select():
|
||||
xstart_info, start = Xstart.get_or_create(
|
||||
x_id=x_token_info.id,
|
||||
)
|
||||
|
||||
# if xstart_info.start:
|
||||
# continue
|
||||
|
||||
hun_web = Hub_Web(x_info=x_token_info, xstart_info=xstart_info)
|
||||
|
||||
executor.submit(hun_web.action)
|
||||
|
||||
time.sleep(delay_between_start)
|
||||
# # 同时运行
|
||||
# max_threads = 1
|
||||
# delay_between_start = 15 # 每次启动线程之间的延迟时间(秒)
|
||||
#
|
||||
# with ThreadPoolExecutor(max_workers=max_threads) as executor:
|
||||
#
|
||||
# for x_token_info in XToken.select():
|
||||
# xstart_info, start = Xstart.get_or_create(
|
||||
# x_id=x_token_info.id,
|
||||
# )
|
||||
#
|
||||
# # if xstart_info.start:
|
||||
# # continue
|
||||
#
|
||||
# hun_web = Hub_Web(x_info=x_token_info, xstart_info=xstart_info)
|
||||
#
|
||||
# executor.submit(hun_web.action)
|
||||
#
|
||||
# time.sleep(delay_between_start)
|
||||
|
||||
Reference in New Issue
Block a user