requests
get
get不带参数的请求
import requests
# 不带任何参数和请求头的请求
url = 'http://www.baidu.com'
res = requests.get(url)
print((type(res),res,res.text))
执行结果:接口返回码,和响应对象的内容(HTML源码)
(<class 'requests.models.Response'>, <Response [200]>, '<!DOCTYPE html>\r\n<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>ç\x99¾åº¦ä¸\x80ä¸\x8bï¼\x8cä½\xa0å°±ç\x9f¥é\x81\x93</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=ç\x99¾åº¦ä¸\x80ä¸\x8b class="bg s_btn"></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>æ\x96°é\x97»</a> <a href=http://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>å\x9c°å\x9b¾</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>è§\x86é¢\x91</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>è´´å\x90§</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>ç\x99»å½\x95</a> </noscript> <script>document.write(\'<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=\'+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ \'" name="tj_login" class="lb">ç\x99»å½\x95</a>\');</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">æ\x9b´å¤\x9a产å\x93\x81</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>å\x85³äº\x8eç\x99¾åº¦</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>©2017 Baidu <a href=http://www.baidu.com/duty/>使ç\x94¨ç\x99¾åº¦å\x89\x8då¿\x85读</a> <a href=http://jianyi.baidu.com/ class=cp-feedback>æ\x84\x8fè§\x81å\x8f\x8dé¦\x88</a> 京ICPè¯\x81030173å\x8f· <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>\r\n')
get带参数的请求
#get带参数
url='http://httpbin.org/get'
# 把参数封装成字典
data = {'id':1,'no':1}
res=requests.get(url,params=data)
print(res.text)
执行结果在url中把data和url拼接了
{
"args": {
"id": "1",
"no": "1"
},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba368d-0c480b72306e0baf198cadf6"
},
"origin": "58.247.140.250",
"url": "http://httpbin.org/get?id=1&no=1"
}
get带参数和请求头的请求
url='http://httpbin.org/get'
data = {'id':1,'no':1}
# get带headers
headers_info ={'cookie':'123123'}
res=requests.get(url,params=data,headers=headers_info)
print(res.text)
执行结果中多了cookie
{
"args": {
"id": "1",
"no": "1"
},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Cookie": "123123",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba3768-682e67d11edd17382b5da043"
},
"origin": "58.247.140.250",
"url": "http://httpbin.org/get?id=1&no=1"
}
post
post不带任何参数和请求头的请求
# 不带任何参数和请求头的请求
url = 'http://www.baidu.com'
res = requests.get(url)
print((type(res),res,res.text))
执行结果
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "0",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba3895-51ffadbe0074cd024981b854"
},
"json": null,
"origin": "58.247.140.250",
"url": "http://httpbin.org/post"
}
post带请求头
#post带请求头
url='http://httpbin.org/post'
headers_info={'token':'123123'}
res = requests.post(url,headers=headers_info)
print(res.text)
执行结果中多了token
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "0",
"Host": "httpbin.org",
"Token": "123123",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba3943-76e5fbfb7a9e2e436760453e"
},
"json": null,
"origin": "58.247.140.250",
"url": "http://httpbin.org/post"
}
post带表单参数的请求
url='http://httpbin.org/post'
headers_info={'token':'123123'}
# 带表单形式的参数
form_data={'username':'yanan'}
res=requests.post(url,headers=headers_info,data=form_data)
print(res.text)
执行结果:数据存在form中
{
"args": {},
"data": "",
"files": {},
"form": {
"username": "yanan"
},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "14",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "httpbin.org",
"Token": "123123",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba39c9-71838ffd7ee7cb8b4b5f929c"
},
"json": null,
"origin": "58.247.140.250",
"url": "http://httpbin.org/post"
}
post带json参数的请求
#json格式的参数
url='http://httpbin.org/post'
headers_info={'token':'123123'}
json_data={'username':'yanan'}
res=requests.post(url,headers=headers_info,json=json_data)
print(res.text)
执行结果数据在json中
{
"args": {},
"data": "{\"username\": \"yanan\"}",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "21",
"Content-Type": "application/json",
"Host": "httpbin.org",
"Token": "123123",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba3aa2-7645b9be58cddab253ddf4c9"
},
"json": {
"username": "yanan"
},
"origin": "58.247.140.250",
"url": "http://httpbin.org/post"
}
post带参数&xxx=111
url='http://httpbin.org/post'
headers_info={'token':'123123'}
# 带参数http://www.ssdsfdsf&iii=111
param_data={'username':'www'}
res=requests.post(url,headers=headers_info,params=param_data)
print(res.text)
执行结果数据在args中
{
"args": {
"username": "www"
},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "0",
"Host": "httpbin.org",
"Token": "123123",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba3c51-15e6e8f27fbac72b4fad76ee"
},
"json": null,
"origin": "58.247.140.250",
"url": "http://httpbin.org/post?username=www"
}
post
目录
文件上传参数
url='http://httpbin.org/post'
headers_info={'token':'123123'}
# 带参数http://www.ssdsfdsf&iii=111
param_data={'username':'www'}
file={'file':open('introduce1.text','rb')}
res=requests.post(url,files=file)
print(res.text)
file以二进制编码格式展示
{
"args": {},
"data": "",
"files": {
"file": "http\u8bf7\u6c42\u7531\u4ee5\u4e0b\u90e8\u5206\u7ec4\u6210\r\nrequest_line:\u5305\u62ec \u8bf7\u6c42\u65b9\u6cd5\uff1amethod \u8bbf\u95ee\u8d44\u6e90\uff1aurl\r\nheaders\r\nAuthorization\uff1a\u6388\u6743\u4fe1\u606f\r\nContent_type\uff1a\u8bf7\u6c42\u65b9\u5f0f\r\n\r\nHTTP\u72b6\u6001\u7801(HTTP Status Code)\r\n\r\n\u4e00\u4e9b\u5e38\u89c1\u7684\u72b6\u6001\u7801\u4e3a\uff1a\r\n1xx(\u4e34\u65f6\u54cd\u5e94)\u8868\u793a\u4e34\u65f6\u54cd\u5e94\u5e76\u9700\u8981\u8bf7\u6c42\u8005\u7ee7\u7eed\u6267\u884c\u64cd\u4f5c\u7684\u72b6\u6001\u4ee3\u7801\u3002\r\n100 (\u7ee7\u7eed) \u8bf7\u6c42\u8005\u5e94\u5f53\u7ee7\u7eed\u63d0\u51fa\u8bf7\u6c42\u3002 \u670d\u52a1\u5668\u8fd4\u56de\u6b64\u4ee3\u7801\u8868\u793a\u5df2\u6536\u5230\u8bf7\u6c42\u7684\u7b2c\u4e00\u90e8\u5206\uff0c\u6b63\u5728\u7b49\u5f85\u5176\u4f59\u90e8\u5206\u3002\r\n101 (\u5207\u6362\u534f\u8bae) \u8bf7\u6c42\u8005\u5df2\u8981\u6c42\u670d\u52a1\u5668\u5207\u6362\u534f\u8bae\uff0c\u670d\u52a1\u5668\u5df2\u786e\u8ba4\u5e76\u51c6\u5907\u5207\u6362\u3002\r\n\r\n2xx (\u6210\u529f)\u8868\u793a\u6210\u529f\u5904\u7406\u4e86\u8bf7\u6c42\u7684\u72b6\u6001\u4ee3\u7801\u3002\r\n200 (\u6210\u529f) \u670d\u52a1\u5668\u5df2\u6210\u529f\u5904\u7406\u4e86\u8bf7\u6c42\u3002 \u901a\u5e38\uff0c\u8fd9\u8868\u793a\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u8bf7\u6c42\u7684\u7f51\u9875\u3002\r\n201 (\u5df2\u521b\u5efa) \u8bf7\u6c42\u6210\u529f\u5e76\u4e14\u670d\u52a1\u5668\u521b\u5efa\u4e86\u65b0\u7684\u8d44\u6e90\u3002\r\n202 (\u5df2\u63a5\u53d7) \u670d\u52a1\u5668\u5df2\u63a5\u53d7\u8bf7\u6c42\uff0c\u4f46\u5c1a\u672a\u5904\u7406\u3002\r\n203 (\u975e\u6388\u6743\u4fe1\u606f) \u670d\u52a1\u5668\u5df2\u6210\u529f\u5904\u7406\u4e86\u8bf7\u6c42\uff0c\u4f46\u8fd4\u56de\u7684\u4fe1\u606f\u53ef\u80fd\u6765\u81ea\u53e6\u4e00\u6765\u6e90\u3002\r\n204 (\u65e0\u5185\u5bb9) \u670d\u52a1\u5668\u6210\u529f\u5904\u7406\u4e86\u8bf7\u6c42\uff0c\u4f46\u6ca1\u6709\u8fd4\u56de\u4efb\u4f55\u5185\u5bb9\u3002\r\n205 (\u91cd\u7f6e\u5185\u5bb9) \u670d\u52a1\u5668\u6210\u529f\u5904\u7406\u4e86\u8bf7\u6c42\uff0c\u4f46\u6ca1\u6709\u8fd4\u56de\u4efb\u4f55\u5185\u5bb9\u3002\r\n206 (\u90e8\u5206\u5185\u5bb9) \u670d\u52a1\u5668\u6210\u529f\u5904\u7406\u4e86\u90e8\u5206 GET \u8bf7\u6c42\u3002\r\n\r\n3xx (\u91cd\u5b9a\u5411) \u8868\u793a\u8981\u5b8c\u6210\u8bf7\u6c42\uff0c\u9700\u8981\u8fdb\u4e00\u6b65\u64cd\u4f5c\u3002 \u901a\u5e38\uff0c\u8fd9\u4e9b\u72b6\u6001\u4ee3\u7801\u7528\u6765\u91cd\u5b9a\u5411\u3002\r\n300 (\u591a\u79cd\u9009\u62e9) \u9488\u5bf9\u8bf7\u6c42\uff0c\u670d\u52a1\u5668\u53ef\u6267\u884c\u591a\u79cd\u64cd\u4f5c\u3002 \u670d\u52a1\u5668\u53ef\u6839\u636e\u8bf7\u6c42\u8005 (user agent) \u9009\u62e9\u4e00\u9879\u64cd\u4f5c\uff0c\u6216\u63d0\u4f9b\u64cd\u4f5c\u5217\u8868\u4f9b\u8bf7\u6c42\u8005\u9009\u62e9\u3002\r\n301 (\u6c38\u4e45\u79fb\u52a8) \u8bf7\u6c42\u7684\u7f51\u9875\u5df2\u6c38\u4e45\u79fb\u52a8\u5230\u65b0\u4f4d\u7f6e\u3002 \u670d\u52a1\u5668\u8fd4\u56de\u6b64\u54cd\u5e94(\u5bf9 GET \u6216 HEAD \u8bf7\u6c42\u7684\u54cd\u5e94)\u65f6\uff0c\u4f1a\u81ea\u52a8\u5c06\u8bf7\u6c42\u8005\u8f6c\u5230\u65b0\u4f4d\u7f6e\u3002\r\n302 (\u4e34\u65f6\u79fb\u52a8) \u670d\u52a1\u5668\u76ee\u524d\u4ece\u4e0d\u540c\u4f4d\u7f6e\u7684\u7f51\u9875\u54cd\u5e94\u8bf7\u6c42\uff0c\u4f46\u8bf7\u6c42\u8005\u5e94\u7ee7\u7eed\u4f7f\u7528\u539f\u6709\u4f4d\u7f6e\u6765\u8fdb\u884c\u4ee5\u540e\u7684\u8bf7\u6c42\u3002\r\n303 (\u67e5\u770b\u5176\u4ed6\u4f4d\u7f6e) \u8bf7\u6c42\u8005\u5e94\u5f53\u5bf9\u4e0d\u540c\u7684\u4f4d\u7f6e\u4f7f\u7528\u5355\u72ec\u7684 GET \u8bf7\u6c42\u6765\u68c0\u7d22\u54cd\u5e94\u65f6\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u6b64\u4ee3\u7801\u3002\r\n304 (\u672a\u4fee\u6539) \u81ea\u4ece\u4e0a\u6b21\u8bf7\u6c42\u540e\uff0c\u8bf7\u6c42\u7684\u7f51\u9875\u672a\u4fee\u6539\u8fc7\u3002 \u670d\u52a1\u5668\u8fd4\u56de\u6b64\u54cd\u5e94\u65f6\uff0c\u4e0d\u4f1a\u8fd4\u56de\u7f51\u9875\u5185\u5bb9\u3002\r\n305 (\u4f7f\u7528\u4ee3\u7406) \u8bf7\u6c42\u8005\u53ea\u80fd\u4f7f\u7528\u4ee3\u7406\u8bbf\u95ee\u8bf7\u6c42\u7684\u7f51\u9875\u3002 \u5982\u679c\u670d\u52a1\u5668\u8fd4\u56de\u6b64\u54cd\u5e94\uff0c\u8fd8\u8868\u793a\u8bf7\u6c42\u8005\u5e94\u4f7f\u7528\u4ee3\u7406\u3002\r\n307 (\u4e34\u65f6\u91cd\u5b9a\u5411) \u670d\u52a1\u5668\u76ee\u524d\u4ece\u4e0d\u540c\u4f4d\u7f6e\u7684\u7f51\u9875\u54cd\u5e94\u8bf7\u6c42\uff0c\u4f46\u8bf7\u6c42\u8005\u5e94\u7ee7\u7eed\u4f7f\u7528\u539f\u6709\u4f4d\u7f6e\u6765\u8fdb\u884c\u4ee5\u540e\u7684\u8bf7\u6c42\u3002\r\n\r\n4xx(\u8bf7\u6c42\u9519\u8bef) \u8fd9\u4e9b\u72b6\u6001\u4ee3\u7801\u8868\u793a\u8bf7\u6c42\u53ef\u80fd\u51fa\u9519\uff0c\u59a8\u788d\u4e86\u670d\u52a1\u5668\u7684\u5904\u7406\u3002\r\n400 (\u9519\u8bef\u8bf7\u6c42) \u670d\u52a1\u5668\u4e0d\u7406\u89e3\u8bf7\u6c42\u7684\u8bed\u6cd5\u3002\r\n401 (\u672a\u6388\u6743) \u8bf7\u6c42\u8981\u6c42\u8eab\u4efd\u9a8c\u8bc1\u3002 \u5bf9\u4e8e\u9700\u8981\u767b\u5f55\u7684\u7f51\u9875\uff0c\u670d\u52a1\u5668\u53ef\u80fd\u8fd4\u56de\u6b64\u54cd\u5e94\u3002\r\n403 (\u7981\u6b62) \u670d\u52a1\u5668\u62d2\u7edd\u8bf7\u6c42\u3002\r\n404 (\u672a\u627e\u5230) \u670d\u52a1\u5668\u627e\u4e0d\u5230\u8bf7\u6c42\u7684\u7f51\u9875\u3002\r\n405 (\u65b9\u6cd5\u7981\u7528) \u7981\u7528\u8bf7\u6c42\u4e2d\u6307\u5b9a\u7684\u65b9\u6cd5\u3002\r\n406 (\u4e0d\u63a5\u53d7) \u65e0\u6cd5\u4f7f\u7528\u8bf7\u6c42\u7684\u5185\u5bb9\u7279\u6027\u54cd\u5e94\u8bf7\u6c42\u7684\u7f51\u9875\u3002\r\n407 (\u9700\u8981\u4ee3\u7406\u6388\u6743) \u6b64\u72b6\u6001\u4ee3\u7801\u4e0e 401(\u672a\u6388\u6743)\u7c7b\u4f3c\uff0c\u4f46\u6307\u5b9a\u8bf7\u6c42\u8005\u5e94\u5f53\u6388\u6743\u4f7f\u7528\u4ee3\u7406\u3002\r\n408 (\u8bf7\u6c42\u8d85\u65f6) \u670d\u52a1\u5668\u7b49\u5019\u8bf7\u6c42\u65f6\u53d1\u751f\u8d85\u65f6\u3002\r\n409 (\u51b2\u7a81) \u670d\u52a1\u5668\u5728\u5b8c\u6210\u8bf7\u6c42\u65f6\u53d1\u751f\u51b2\u7a81\u3002 \u670d\u52a1\u5668\u5fc5\u987b\u5728\u54cd\u5e94\u4e2d\u5305\u542b\u6709\u5173\u51b2\u7a81\u7684\u4fe1\u606f\u3002\r\n410 (\u5df2\u5220\u9664) \u5982\u679c\u8bf7\u6c42\u7684\u8d44\u6e90\u5df2\u6c38\u4e45\u5220\u9664\uff0c\u670d\u52a1\u5668\u5c31\u4f1a\u8fd4\u56de\u6b64\u54cd\u5e94\u3002\r\n411 (\u9700\u8981\u6709\u6548\u957f\u5ea6) \u670d\u52a1\u5668\u4e0d\u63a5\u53d7\u4e0d\u542b\u6709\u6548\u5185\u5bb9\u957f\u5ea6\u6807\u5934\u5b57\u6bb5\u7684\u8bf7\u6c42\u3002\r\n412 (\u672a\u6ee1\u8db3\u524d\u63d0\u6761\u4ef6) \u670d\u52a1\u5668\u672a\u6ee1\u8db3\u8bf7\u6c42\u8005\u5728\u8bf7\u6c42\u4e2d\u8bbe\u7f6e\u7684\u5176\u4e2d\u4e00\u4e2a\u524d\u63d0\u6761\u4ef6\u3002\r\n413 (\u8bf7\u6c42\u5b9e\u4f53\u8fc7\u5927) \u670d\u52a1\u5668\u65e0\u6cd5\u5904\u7406\u8bf7\u6c42\uff0c\u56e0\u4e3a\u8bf7\u6c42\u5b9e\u4f53\u8fc7\u5927\uff0c\u8d85\u51fa\u670d\u52a1\u5668\u7684\u5904\u7406\u80fd\u529b\u3002\r\n414 (\u8bf7\u6c42\u7684 URI \u8fc7\u957f) \u8bf7\u6c42\u7684 URI(\u901a\u5e38\u4e3a\u7f51\u5740)\u8fc7\u957f\uff0c\u670d\u52a1\u5668\u65e0\u6cd5\u5904\u7406\u3002\r\n415 (\u4e0d\u652f\u6301\u7684\u5a92\u4f53\u7c7b\u578b) \u8bf7\u6c42\u7684\u683c\u5f0f\u4e0d\u53d7\u8bf7\u6c42\u9875\u9762\u7684\u652f\u6301\u3002\r\n416 (\u8bf7\u6c42\u8303\u56f4\u4e0d\u7b26\u5408\u8981\u6c42) \u5982\u679c\u9875\u9762\u65e0\u6cd5\u63d0\u4f9b\u8bf7\u6c42\u7684\u8303\u56f4\uff0c\u5219\u670d\u52a1\u5668\u4f1a\u8fd4\u56de\u6b64\u72b6\u6001\u4ee3\u7801\u3002\r\n417 (\u672a\u6ee1\u8db3\u671f\u671b\u503c) \u670d\u52a1\u5668\u672a\u6ee1\u8db3\"\u671f\u671b\"\u8bf7\u6c42\u6807\u5934\u5b57\u6bb5\u7684\u8981\u6c42\u3002\r\n\r\n5xx(\u670d\u52a1\u5668\u9519\u8bef)\u8fd9\u4e9b\u72b6\u6001\u4ee3\u7801\u8868\u793a\u670d\u52a1\u5668\u5728\u5c1d\u8bd5\u5904\u7406\u8bf7\u6c42\u65f6\u53d1\u751f\u5185\u90e8\u9519\u8bef\u3002 \u8fd9\u4e9b\u9519\u8bef\u53ef\u80fd\u662f\u670d\u52a1\u5668\u672c\u8eab\u7684\u9519\u8bef\uff0c\u800c\u4e0d\u662f\u8bf7\u6c42\u51fa\u9519\u3002\r\n500 (\u670d\u52a1\u5668\u5185\u90e8\u9519\u8bef) \u670d\u52a1\u5668\u9047\u5230\u9519\u8bef\uff0c\u65e0\u6cd5\u5b8c\u6210\u8bf7\u6c42\u3002\r\n501 (\u5c1a\u672a\u5b9e\u65bd) \u670d\u52a1\u5668\u4e0d\u5177\u5907\u5b8c\u6210\u8bf7\u6c42\u7684\u529f\u80fd\u3002 \u4f8b\u5982\uff0c\u670d\u52a1\u5668\u65e0\u6cd5\u8bc6\u522b\u8bf7\u6c42\u65b9\u6cd5\u65f6\u53ef\u80fd\u4f1a\u8fd4\u56de\u6b64\u4ee3\u7801\u3002\r\n502 (\u9519\u8bef\u7f51\u5173) \u670d\u52a1\u5668\u4f5c\u4e3a\u7f51\u5173\u6216\u4ee3\u7406\uff0c\u4ece\u4e0a\u6e38\u670d\u52a1\u5668\u6536\u5230\u65e0\u6548\u54cd\u5e94\u3002\r\n503 (\u670d\u52a1\u4e0d\u53ef\u7528) \u670d\u52a1\u5668\u76ee\u524d\u65e0\u6cd5\u4f7f\u7528(\u7531\u4e8e\u8d85\u8f7d\u6216\u505c\u673a\u7ef4\u62a4)\u3002 \u901a\u5e38\uff0c\u8fd9\u53ea\u662f\u6682\u65f6\u72b6\u6001\u3002\r\n504 (\u7f51\u5173\u8d85\u65f6) \u670d\u52a1\u5668\u4f5c\u4e3a\u7f51\u5173\u6216\u4ee3\u7406\uff0c\u4f46\u662f\u6ca1\u6709\u53ca\u65f6\u4ece\u4e0a\u6e38\u670d\u52a1\u5668\u6536\u5230\u8bf7\u6c42\u3002\r\n505 (HTTP \u7248\u672c\u4e0d\u53d7\u652f\u6301) \u670d\u52a1\u5668\u4e0d\u652f\u6301\u8bf7\u6c42\u4e2d\u6240\u7528\u7684 HTTP \u534f\u8bae\u7248\u672c\u3002\r\n"
},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate",
"Content-Length": "4838",
"Content-Type": "multipart/form-data; boundary=1b475841770279186874372e3bc0b2b1",
"Host": "httpbin.org",
"User-Agent": "python-requests/2.31.0",
"X-Amzn-Trace-Id": "Root=1-64ba3d15-417d143e14afbb2a5fd77789"
},
"json": null,
"origin": "58.247.140.250",
"url": "http://httpbin.org/post"
}