发布时间:2019-07-25 09:18:14编辑:auto阅读(1945)
# -*- coding: utf-8 -*-
import requests
def get_key_info(response, *args, **kwargs):
"""callback function"""
print response.headers['Content-Type']
def main():
"""
主程序
"""
requests.get('http://www.baidu.com', hooks=dict(response=get_key_info))
main()
上一篇: 在CentOS7中安装python3.7
下一篇: python类型注解
51027
50408
41022
37886
32351
29248
28130
22967
22929
21257
1131°
1836°
1482°
1419°
1706°
1509°
2170°
3741°
3671°
2583°