首页 > 编程语言 > 详细

python request使用

时间:2016-08-18 19:33:30      阅读:107      评论:0      收藏:0      [点我收藏+]

 

相比httplib、urllib,request真是太美丽了,记录下

get请求:

    def get_res(url):
        res=requests.get(url)
        return res

  

返回值:

res.txt  字符格式
res.content  数组格式
res.json() 字典格式

  

python request使用

原文:http://www.cnblogs.com/muxinyue/p/5785004.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!