import requests
from fake_useragent import UserAgent
h = {
"user-agent": UserAgent().chrome
}
response = requests.get(url="https://www.zhihu.com/question/362788804",headers = h)
print(response)
结果:<Response [200]>
j = {"userName":"test","password":"1234","gender":1,"phoneNum":"110","email":"beihe@163.com","address":"Beijing"}
r = requests.post(url="http://www.neeo.cc:6002/pinter/com/register",json=j)
print(r.json())
结果:{'code': '0', 'message': '注册成功', 'data': None}