urllib and urllib2 区别 –博主提示:下面的是python2中的用法,python3需要做出相应修改. urllib和urllib2模块都做与请求URL相关的操作,但他们提供不同的功能. urllib2.urlopen accepts an instance of the Request class or a url, (whereas urllib.urlopen only accepts a url 中文意思就是:urllib2.urlopen可以接受一个Request对象…
摘自:http://1oscar.github.io/blog/2015/07/05/%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3urllib;urllib2;requests.html urllib and urllib2 区别 urllib和urllib2模块都做与请求URL相关的操作,但他们提供不同的功能. urllib2.urlopen accepts an instance of the Request class or a url, (whereas ur…
一.Object类型 1.1创建方式 ①new关键字 : var person = new Oject(); ②给定直接量: var person = { name : "zhangsan", age : "18" } 1.2.访问方式 :一种为 对象点属性名称 “person.name” 或者使用中括号 “person["name"]” 使用中括号必须用引号括起来 或者括号内使用的是变量 例如:var b="name&q…