This commit is contained in:
Pin Lin
2018-03-05 01:31:35 +08:00
committed by GitHub
parent 6ee5286343
commit 4165e5a386

View File

@ -1,11 +1,18 @@
import time
import random
import threading
import requests, time
import requests
payload = {'name': 'hi'}
class Taiwanese:
def __init__(self):
self.name = "愛國者第 " + str(random.randint(1000087, 8700000)) + ""
self.session = requests.Session()
class MyTherad(threading.Thread):
def run(self):
response = requests.get('http://www.cmiaahq.org.tw/signup/ajax.php?ajcode=1&apost=1', data=payload)
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)