利用多线程循环post刷票数(Python代码)
刚好有个投票项目可以测试一下
用这种方式刷票数,要求很多:没有次数限制,没有验证限制
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()
此文章仅供学习交流,切勿用于违法
请合理合法进行爬虫操作
请合理合法进行爬虫操作
请合理合法进行爬虫操作
本文链接:https://www.xhily.com/7692.html
版权声明:本博客所有文章除特别声明外,均采用 CC BY 4.0 CN协议 许可协议。转载请注明出处!
版权声明:本博客所有文章除特别声明外,均采用 CC BY 4.0 CN协议 许可协议。转载请注明出处!
THE END
0
二维码
打赏
海报


利用多线程循环post刷票数(Python代码)
刚好有个投票项目可以测试一下
用这种方式刷票数,要求很多:没有次数限制,没有验证限制
import requests
import threading
url = "POST的网址"
da……

文章目录
关闭
共有 0 条评论