Files
lm_code/推特/导入推特.py

30 lines
770 B
Python
Raw Permalink Normal View History

2026-01-15 13:43:12 +08:00
from pathlib import Path
2025-11-19 15:15:50 +08:00
from models.xtoken import XToken
2026-01-15 13:43:12 +08:00
from db_init import ensure_tables
2025-11-19 15:15:50 +08:00
if __name__ == '__main__':
2026-01-15 13:43:12 +08:00
ensure_tables()
2025-11-19 15:15:50 +08:00
2026-01-15 13:43:12 +08:00
file_path = Path(__file__).parent / '卡密信息-499251204164220357.txt'
with open(file_path, 'r', encoding='utf-8') as f:
2025-11-19 15:15:50 +08:00
content = f.read()
tasks = [] # 创建任务列表
lines = content.split('\n')
n = 0
for _, line in enumerate(lines):
print(line.split('----'))
XToken.get_or_create(
user_name = line.split('----')[0],
password = line.split('----')[1],
email = line.split('----')[2],
two_fa = line.split('----')[-2],
token = line.split('----')[-1],
# email_pwd = line.split('----')[1],
)