This repository has been archived on 2026-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2022-02-03 20:02:38 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
# -- coding:utf-8 --
|
|
|
|
|
# @Author: markushammered@gmail.com
|
|
|
|
|
# @Development Tool: PyCharm
|
|
|
|
|
# @Create Time: 2022/2/3
|
|
|
|
|
# @File Name: resp_test.py
|
|
|
|
|
|
|
|
|
|
import requests
|
|
|
|
|
import random
|
|
|
|
|
|
2022-02-04 11:08:34 +08:00
|
|
|
|
|
|
|
|
def request_test() -> None:
|
|
|
|
|
"""
|
|
|
|
|
请求测试
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
2022-02-04 12:29:04 +08:00
|
|
|
for i in range(100):
|
|
|
|
|
resp = requests.get(f'http://127.0.0.1:8000/API?name={i}')
|
|
|
|
|
print(resp)
|
2022-02-04 11:08:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def download_test() -> None:
|
|
|
|
|
"""
|
|
|
|
|
下载测试
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
resp = requests.get('https://count.getloli.com/get/@Moe-counter.github')
|
|
|
|
|
with open('download_test.html', 'wb') as fp:
|
|
|
|
|
fp.write(resp.content)
|
|
|
|
|
|
|
|
|
|
|
2022-02-04 12:29:04 +08:00
|
|
|
request_test()
|