刚好有个投票项目可以测试一下
用这种方式刷票数,要求很多:没有次数限制,没有验证限制
import requests
import threading
url = "POST的网址"
data = {
"key1": "",
"key2": "",
"key3": "",
"key4": ""
}
#以下三行是单线程循环,比较慢
# for i in range(10000): # 重复1万次
# response = requests.post(url, data=data)
# print(response.text)
#以下用多线程,速度起飞
def thread_function():
response = requests.post(url, data=data)
print(response.text)
pass
for i in range(100000):
t = threading.Thread(target=thread_function)
t.start()
此文章仅供学习交流,切勿用于违法
请合理合法进行爬虫操作
请合理合法进行爬虫操作
请合理合法进行爬虫操作