-
web as a db
spider
restful API
automatic tool
查看全部 -
//文档 docs.python-requests.org/en/master/
//kenneth reitz:
//
r = request.get('auth=('user','pass')) r.status_code r.headers['content-type'] r.encoding r.text r.json()
www.kenneth4reitz.org
查看全部 -
https://blog.csdn.net/screaming/article/details/51364594
urllib
and urllib2are both Python modules that do URL request related stuff but offer different functionalities. Their two most significant differences are listed below:
urllib 和urllib2都是接受URL请求的相关模块,但是提供了不同的功能。两个最显著的不同如下:urllib2
can accept aRequest
object to set the headers for a URL request,urllib
accepts only a URL. That means, you cannot masquerade your User Agent string etc.
urllib2可以接受一个Request类的实例来设置URL请求的headers,urllib仅可以接受URL。这意味着,你不可以伪装你的User Agent字符串等。
urllib
provides theurlencode
method which is used for the generation of GET query strings,urllib2
doesn't have such a function. This is one of the reasons whyurllib
is often used along withurllib2
.
urllib提供urlencode方法用来GET查询字符串的产生,而urllib2没有。这是为何urllib常和urllib2一起使用的原因。
查看全部 -
第一章小结
1.1课程路线图
1.2认识Requests类库
1.3学习Requests类库的意义
1.4环境准备
查看全部 -
1.4环境准备
查看全部 -
1.3学好Requests类库意义
1.这是一个Web时代(Web as a DB)
2.爬虫的必备法器
3.服务器编程基础(Restful API)4.自动化测试的工具箱
查看全部 -
认识Requests库
查看全部 -
认识Requests库
查看全部 -
1.2认识Requests类库
1.文档地址: http://docs.python-requests.org/en/master/
2.相关数据:
Github Star: 19,345
Pypi: 9k/month
3. Kenneth Reitz: http://www.kennethreitz.org/
查看全部 -
Beautiful is better than ugly
查看全部 -
GET:查看资源
POST:增加资源
PUT:修改资源
DELETE:删除资源
HEAD:查看响应头
OPTIONS:查看可用请求方法
查看全部 -
不大理解__call__方法的运行机制?
查看全部 -
urlib库的关系
查看全部 -
超文本协议
查看全部 -
urllib和urllib2是相互独立的模块
requests库使用了urllib3(多次请求重复使用一个socket)
UA——user Agent
urllib1,urllib2,urllib3不是进化关系
查看全部
举报