发布时间:2019-07-25 09:18:14编辑:auto阅读(1890)
# -*- 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类型注解
49986
49243
39900
36941
31343
28180
27138
21934
21869
20210
206°
212°
199°
359°
372°
983°
1812°
1703°
1370°
2784°