From f276d7ab02e773672b3a55bfb85d625f9cd8d0b5 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 19 Nov 2025 17:59:51 +0800 Subject: [PATCH] fwefwf --- 推特/main.py | 3 ++ 推特/test.py | 84 +++++++++++++++++++++++++++++----------------------- 2 files changed, 50 insertions(+), 37 deletions(-) diff --git a/推特/main.py b/推特/main.py index b6d4c27..91e9e7d 100644 --- a/推特/main.py +++ b/推特/main.py @@ -349,6 +349,9 @@ if __name__ == '__main__': x_id=x_token_info.id, ) + if xstart_info.start == "1": + continue + hun_web = Hub_Web(x_info=x_token_info, xstart_info=xstart_info) executor.submit(hun_web.action) diff --git a/推特/test.py b/推特/test.py index febd503..358a704 100644 --- a/推特/test.py +++ b/推特/test.py @@ -1,47 +1,57 @@ from urllib.parse import urlparse +from bit_tools import deleteBrowser from models import ips from models.ips import Ips +from models.xstart import Xstart if __name__ == '__main__': - with open('ip.txt', 'r', encoding='utf-8') as f: - content = f.read() + # with open('ip.txt', 'r', encoding='utf-8') as f: + # content = f.read() + # + # tasks = [] # 创建任务列表 + # lines = content.split('\n') + # + # n = 0 + # for _, line in enumerate(lines): + # # print(line) + # # 解析代理 URL + # parsed = urlparse(line) + # # 获取代理用户名和密码 + # username = parsed.username + # password = parsed.password + # + # # 获取代理主机和端口 + # proxy_host = parsed.hostname + # proxy_port = parsed.port + # + # # host = netloc_parts[0] + # # port = int(netloc_parts[1]) + # # + # # # 提取用户名和密码 + # # username = netloc_parts[2] + # # password = netloc_parts[3] + # + # # # 输出解析结果 + # # print(f"协议: {scheme}") + # # print(f"主机: {host}") + # # print(f"端口: {port}") + # # print(f"用户名: {username}") + # # print(f"密码: {password}") + # + # Ips.get_or_create( + # host=proxy_host, + # port=proxy_port, + # username=username, + # password=password, + # ) - tasks = [] # 创建任务列表 - lines = content.split('\n') - - n = 0 - for _, line in enumerate(lines): - # print(line) - - # 解析 URL - parsed_url = urlparse(line) - - # 获取协议 - scheme = parsed_url.scheme - - # 提取主机和端口信息 - netloc_parts = parsed_url.netloc.split(':') - host = netloc_parts[0] - port = int(netloc_parts[1]) - - # 提取用户名和密码 - username = netloc_parts[2] - password = netloc_parts[3] - - # 输出解析结果 - print(f"协议: {scheme}") - print(f"主机: {host}") - print(f"端口: {port}") - print(f"用户名: {username}") - print(f"密码: {password}") - - Ips.get_or_create( - host=host, - port=port, - username=username, - password=password, - ) + for i in Xstart.select().where( + Xstart.start == "0" + ): + print(i.x_id) + deleteBrowser(id=i.bit_id) + i.delete_instance() \ No newline at end of file