发布时间:2019-07-25 09:18:14编辑:auto阅读(1915)
# -*- 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类型注解
50520
49832
40424
37434
31857
28725
27655
22432
22432
20746
516°
1138°
925°
858°
1106°
978°
1598°
2973°
2668°
2029°