import random

if __name__ == '__main__':
    with open('http-ip.txt', 'r', encoding='utf-8') as f:
        content = f.read()

    tasks = []  # 创建任务列表
    lines = content.split('\n')

    por = random.choice(lines)
    # 解析代理信息
    proxy_parts = por.replace("socks5://", "").split(":")
    proxy_host = proxy_parts[0]
    proxy_port = int(proxy_parts[1])
    # proxy_username = proxy_parts[2]
    # proxy_password = proxy_parts[3]

    print(proxy_parts)
